spring-webflow
spring-webflow copied to clipboard
JSF Composite Component causes EL expression exception in binding attribute - Target Unreachable, identifier 'cc' resolved to null [SWF-1710]
Jura Stuchlik opened SWF-1710 and commented
Using SWF with myfaces and compose binding attribute in composite component – like this:
<?xml version="1.0" encoding="UTF-8"?>
<ui:component xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:cc="http://xmlns.jcp.org/jsf/composite" xmlns:h="http://xmlns.jcp.org/jsf/html">
<cc:interface name="inputText" componentType="inputText">
<cc:attribute name="value" type="java.lang.Object" required="true" />
<cc:editableValueHolder name="inputText" targets="inputText" />
</cc:interface>
<cc:implementation>
<div id="#{cc.clientId}" >
<h:inputText id="inputText" binding="#{cc.inputComponent}" value="#{cc.attrs.value}">
<cc:insertChildren />
</h:inputText>
</div>
</cc:implementation>
</ui:component>
Then error occurs:
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'cc' resolved to null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:74)
at org.apache.el.parser.AstValue.setValue(AstValue.java:196)
at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:257)
at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:153)
... 104 common frames omitted
Configuration:
- Spring 4.x
- Spring Webflow 2.4.x
- JSF 2.x
- MyFaces 2.2.12
It is like error with mojarra JSF implementation - #829
Attachments:
- swf-faces-example.zip (16.22 kB)
3 votes, 3 watchers
Jura Stuchlik commented
Basic project for SWF with configured JSF implementation MyFaces and simple composite component with binding attribute. Project generates exceptions on refresh page or send form.
Rossen Stoyanchev commented
Indeed the stack trace looks just like #829 which was fixed in 2.4.1 for Mojarra. If anyone is willing to identify the equivalent of this code for a fix in MyFaces I will consider applying it.