spring-webflow icon indicating copy to clipboard operation
spring-webflow copied to clipboard

JSF Composite Component causes EL expression exception in binding attribute - Target Unreachable, identifier 'cc' resolved to null [SWF-1710]

Open spring-operator opened this issue 7 years ago • 3 comments

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:

3 votes, 3 watchers

spring-operator avatar Sep 13 '17 14:09 spring-operator

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.

spring-operator avatar Sep 13 '17 14:09 spring-operator

Martin Sv commented

Hi, this issue bothers me too. Is there any progress? Thank you

spring-operator avatar Oct 03 '17 10:10 spring-operator

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.

spring-operator avatar Dec 19 '17 01:12 spring-operator