4 Replies Latest reply on Dec 18, 2006 6:58 AM by gavin.king

    action=

    koatto

      i'm trying to set the id of a framework's entityhome object direcly from a link action, but i'm actually getting a wrong EL error.
      That's my code:

      <h1>List of people</h1>
      <h:dataTable value="#{people.resultList}" var="p">
       <h:column>
       <s:link action="#{personHome.setId(p.id)}" view="/parent.jspx" value="#{p.name} #{p.surname}" propagation="begin">
       </s:link>
       </h:column>
      </h:dataTable>



      com.sun.facelets.tag.TagAttributeException: /search.jspx @21,125 action="#{personHome.setId(p.id)}" Error Parsing: #{personHome.setId(p.id)}


      is this possible?

      Thanks.

        • 1. Re: action=
          gavin.king

          you need to use SeamFaceletViewHandler

          • 2. Re: action=
            koatto

            this is my faces-config :

            <faces-config>
            
             <application>
             <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
             </application>
            
             <application>
             <message-bundle>messages</message-bundle>
             <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
             </application>
            
             <!-- Seam transaction management -->
             <lifecycle>
             <phase-listener>org.jboss.seam.jsf.TransactionalSeamPhaseListener</phase-listener>
             </lifecycle>
            
             <!-- No Seam transaction management -->
             <!--
             <lifecycle>
             <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
             </lifecycle>
             -->
            
            </faces-config>


            • 3. Re: action=
              koatto

              updating to 1.1.0 GA seems to solved the previous issue, but i always get a null value in the entityHome.setId method, maybe cause the p.id param isn't evaluated till the render phase while the action is called before.

              is this correct?

              • 4. Re: action=
                gavin.king

                You can only use the variable "p" in the method binding if #{people.resultList} is a DataModel. If it is a list, it cannot work.