2 Replies Latest reply on Mar 22, 2010 1:50 PM by Alan Stock

    Is there a difference between @Factory and <factory .. > ?

    Alan Stock Newbie

      I am getting an exception with a rich:datatable that has a value attribute that gets the value from
      a @Factory that uses a CreateQuery and getResultList.

           <rich:dataTable value="#{etapes}" var="_etape"  rowKeyVar="idx">
                <h:outputText value="#{etapes[idx].destination}" />

      But for some reason that I hope to understand, it does work with a factory in a components.xml

           <rich:dataTable value="#{clients}" var='_client' rowKeyVar="idx">
                     <h:outputText value="A: #{clients[idx-1].nom}"/>

      in components.xml, I have

           <framework:entity-query name="clientsquery" ejbql="select a from Client a" scope="conversation"/>
           <event type="org.jboss.seam.afterTransactionSuccess"> 
               <action execute="#{clientsquery.refresh}" /> 
           <factory name="clients" value="#{clientsquery.resultList}"/>

      I checked the content of @Factory object, it is correct.      

      Is there a difference how EL works with these two types of factories.

      Thank you very for any help or suggestions.