4 Replies Latest reply on Dec 18, 2006 6:58 AM by Gavin King

    action=

    Ale Fred Newbie

      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 Master

          you need to use SeamFaceletViewHandler

          • 2. Re: action=
            Ale Fred Newbie

            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=
              Ale Fred Newbie

              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 Master

                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.