[JAVASERVERFACES_SPEC_PUBLIC-933] Support for zero-arg action/valueChangeListener does not work with EL VariableMapper Created: 31/Jan/11  Updated: 01/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: rogerk Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Status Whiteboard:

size_medium importance_medium


 Description   

Template client:
<h:body >
<ui:decorate template="template.xhtml">
<ui:param name="bean" value="#

{beanA}" />
</ui:decorate>
</h:body>

Template:
<f:subview xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:form >
<h:inputText value="value" valueChangeListener="#{bean.processValueChange}" />
<h:commandButton value="Click" actionListener="#{bean.processAction}" />
</h:form>
</f:subview>

if processValueChange/processAction are methods without event param, a exception
"javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean'
resolved to null" is thrown.
Description
Template client:
<h:body >
<ui:decorate template="template.xhtml">
<ui:param name="bean" value="#{beanA}

" />
</ui:decorate>
</h:body>
Template:

<f:subview xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
<h:form >
<h:inputText value="value" valueChangeListener="#

{bean.processValueChange}

" />
<h:commandButton value="Click" actionListener="#

{bean.processAction}

" />
</h:form>
</f:subview>

if processValueChange/processAction are methods without event param, a exception "javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bean' resolved to null" is thrown.
Show ยป

ADDITIONAL COMMENTS:

Problem can be solved in
com.sun.faces.facelets.tag.jsf.ActionSourceRule.ActionListenerMapper2.applyMetadata:
MethodExpression methodExpressionOneArg = this.attr.getMethodExpression(ctx,
null,ActionSourceRule.ACTION_LISTENER_SIG);
MethodExpression methodExpressionZeroArg = this.attr.getMethodExpression(ctx,
null,ActionSourceRule.ACTION_SIG);

.. new MethodExpressionActionListener(methodExpressionOneArg,
methodExpressionZeroArg)

and probably similarly in Rule for ValueChangeListener.



 Comments   
Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Comment by Manfred Riem [ 01/Aug/14 ]

Setting priority to Minor

Generated at Thu Sep 29 09:38:46 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.