[
https://issues.jboss.org/browse/RF-11125?page=com.atlassian.jira.plugin.s...
]
Brian Leathem updated RF-11125:
-------------------------------
Steps to Reproduce:
use a decorate statement like:
{code}
<ui:decorate template="decorateTemplate.xhtml">
<ui:param name="beanNameRef"
value="#{realBean}" />
</ui:decorate>
{code}
within decorateTemplate.xhtml use a a4j:ajax call like:
{code}
<a4j:ajax listener="#{beanNameRef.foo}"
event="change" />
{code}
You'll see when realBean.foo takes in one parameter (type AjaxBehaviorEvent) then it
works fine. When realBean.foo takes no parameters this will not work. The error will say
beanNameRef resolves to null.
was:
use a decorate statement like:
<ui:decorate template="decorateTemplate.xhtml">
<ui:param name="beanNameRef"
value="#{realBean}" />
</ui:decorate>
within decorateTemplate.xhtml use a a4j:ajax call like:
<a4j:ajax listener="#{beanNameRef.foo}"
event="change" />
You'll see when realBean.foo takes in one parameter (type AjaxBehaviorEvent) then it
works fine. When realBean.foo takes no parameters this will not work. The error will say
beanNameRef resolves to null.
a4j:ajax listener method expression behaves differently for one or
zero parameter methods
-----------------------------------------------------------------------------------------
Key: RF-11125
URL:
https://issues.jboss.org/browse/RF-11125
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-a4j-core
Affects Versions: 4.0.0.Final
Environment: MyFace 2.0.7, Tomcat 6, Richfaces 4.0
Reporter: James G
Labels: a4j:ajax
Fix For: 4.1.0.Tracking
When using a4j:ajax and setting the listener to a bean method, the call works correctly
if the bean method has one parameter of type AjaxBehaviorEvent. If the method has no
parameters then it may not be called correctly. This situation occurs if the method
expression uses a variable scoped in facelets. For example using a ui:param under a
ui:decorate. The method expression for one parameter is created using a call to
ExpressionFactory.createMethodExpression( faceletContext, ... ) but the method expression
for zero parameters is created using ExpressionFactory.createMethodExpression( elContext,
... ). The elContext does not contain the facelet variable mapping and so will not impart
this to the method expression. This needs to be refactored to pass in the faceletContext
when creating the zero parameter method expression.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira