ICEfaces
  1. ICEfaces
  2. ICE-7142

#{cc} cannot be resolved within CC nested in <ice:dataTable>

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.GA
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Mojarra 2.1.2, Tomcat 6.0.32
    • Assignee Priority:
      P2

      Description






      19.08.2011 16:00:37 com.sun.faces.lifecycle.InvokeApplicationPhase execute
      WARNUNG: /resources/table/myAction.xhtml @17,103 target="#{cc.attrs.actionBean[cc.attrs.propertyName]}": Target Unreachable, identifier 'cc' resolved to null
      javax.el.PropertyNotFoundException: /resources/table/myAction.xhtml @17,103 target="#{cc.attrs.actionBean[cc.attrs.propertyName]}": Target Unreachable, identifier 'cc' resolved to null
      at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
      at com.sun.faces.facelets.tag.jsf.core.SetPropertyActionListenerHandler$SetPropertyListener.processAction(SetPropertyActionListenerHandler.java:204)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)
      at javax.faces.component.UICommand.broadcast(UICommand.java:300)
      at com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:622)
      at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:284)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:619)

        Activity

        Hide
        Adrian Gygax added a comment -

        Given this composition:

        <ice:dataTable var="item" value="#

        {myBean.content}

        ">
        <ice:column>
        <t:myAction value="got exception" actionBean="#

        {myBean}

        " />
        </ice:column>
        </ice:dataTable>

        myAction:
        <cc:implementation>
        <h:commandButton value="#

        {cc.attrs.value}

        " action="#

        {cc.attrs.actionBean[cc.attrs.actionName]}

        " >
        <f:setPropertyActionListener value="bla" target="#

        {cc.attrs.actionBean[cc.attrs.propertyName]}

        " />
        </h:commandButton>
        </cc:implementation>

        The cc variable cannot be resolved for <f:setPropertyActionListener>

        Show
        Adrian Gygax added a comment - Given this composition: <ice:dataTable var="item" value="# {myBean.content} "> <ice:column> <t:myAction value="got exception" actionBean="# {myBean} " /> </ice:column> </ice:dataTable> myAction: <cc:implementation> <h:commandButton value="# {cc.attrs.value} " action="# {cc.attrs.actionBean[cc.attrs.actionName]} " > <f:setPropertyActionListener value="bla" target="# {cc.attrs.actionBean[cc.attrs.propertyName]} " /> </h:commandButton> </cc:implementation> The cc variable cannot be resolved for <f:setPropertyActionListener>
        Hide
        Adrian Gygax added a comment -

        Attached test case.

        Note that the button within <h:dataTable> works but the one within <ice:dataTable> doesn't

        Show
        Adrian Gygax added a comment - Attached test case. Note that the button within <h:dataTable> works but the one within <ice:dataTable> doesn't
        Hide
        Mark Collette added a comment -

        Upon investigation of UISeries, the superclass of ice:dataTable, ice:panelTabSet, and our other iterative container components, I found it lacking in some composite component handling code, that's necessary in each lifecycle phase. Adding this processing has fixed this issue.

        Note that it was difficult to test this issue due to a completely unrelated InputRichTextEditor exception, which apparently no one else has been experiencing. I worked around it by modifying icefaces2/compat/components/src/main/java/com/icesoft/faces/component/inputrichtext/InputRichTextResourceHandler.java to do some null checks:

        public Resource createResource(String resourceName, String libraryName, String contentType) {
        if (codeResource != null && codeResource.localPath != null && codeResource.localPath.equals(resourceName))

        { // <<<< //serving up the mapping as a referenced JS resource return codeResource; }

        else if (cssResources != null && cssResources.containsKey(resourceName))

        { // <<<< //serve the modified CSS resources return cssResources.get(resourceName); }

        else

        { //let JSF serve the rest of resources return super.createResource(resourceName, libraryName, contentType); }

        }

        Subversion 26337
        icefaces2/compat/components/src/main/java/com/icesoft/faces/component/panelseries/UISeries.java

        Show
        Mark Collette added a comment - Upon investigation of UISeries, the superclass of ice:dataTable, ice:panelTabSet, and our other iterative container components, I found it lacking in some composite component handling code, that's necessary in each lifecycle phase. Adding this processing has fixed this issue. Note that it was difficult to test this issue due to a completely unrelated InputRichTextEditor exception, which apparently no one else has been experiencing. I worked around it by modifying icefaces2/compat/components/src/main/java/com/icesoft/faces/component/inputrichtext/InputRichTextResourceHandler.java to do some null checks: public Resource createResource(String resourceName, String libraryName, String contentType) { if (codeResource != null && codeResource.localPath != null && codeResource.localPath.equals(resourceName)) { // <<<< //serving up the mapping as a referenced JS resource return codeResource; } else if (cssResources != null && cssResources.containsKey(resourceName)) { // <<<< //serve the modified CSS resources return cssResources.get(resourceName); } else { //let JSF serve the rest of resources return super.createResource(resourceName, libraryName, contentType); } } Subversion 26337 icefaces2/compat/components/src/main/java/com/icesoft/faces/component/panelseries/UISeries.java

          People

          • Assignee:
            Mark Collette
            Reporter:
            Adrian Gygax
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: