2 Replies Latest reply on Apr 7, 2007 6:53 AM by Chris Lowe

    Issue about EL enhancement

    raffaele camanzo Newbie

      Hi all,

      I'm facing an issue using the Seam EL enhancement:

      I have to create a results list, each result has a <s:link.. and the action gets, through the EL enhancement the list items as action parameter.
      Instead of the booking example, I don't want to render the results a table and I use a <ui:repeat> as follows:

      <ui:repeat value="#{ricercaMenu.dataList}" var="actionDataEntry">
       <li>
       <s:link action="#{ricerca.begin(actionDataEntry)}">
       <h:outputText value="#{actionDataEntry.label}"/>
       <s:conversationPropagation type="none"/>
       </s:link>
       </li>
      </ui:repeat>
      


      The list is ok, indeed, the label is present, but when I try to access to a actionDataEntry member inside the #{ricerca.begin(actionDataEntry)} I get a NullPointerException. Is this a bug or I'm missing something?

      Regards,
      Raffaele Camanzo

        • 1. Re: Issue about EL enhancement
          Andy Gibson Novice

          Does your dataList have the @DataModel annotation?

          I believe this is required in order to allow things to be passed around properly, at least from my experience when I had a similar problem with null objects being passed in.

          In your class for the ricercaMenu bean, you should have something like :

          @DataModel
          private List dataList;


          This will tell seam to generate a datamodel for your dataList List, and facilitates the passing of the list item to the ricerca.begin procedure.

          Does your example work with a h:dataTable ?





          • 2. Re: Issue about EL enhancement
            Chris Lowe Apprentice

            Have you defined the Seam view handler in faces-config.xml?

            <faces-config>
             <application>
             <view-handler>org.jboss.seam.ui.facelet.SeamFaceletViewHandler</view-handler>
             </application>
            </faces-config>


            However, will not work if you're using Trinidad components.