Hi, 
i am trying to use an af:table with multiple selection. For this I need access 
to the underlying table.

When I bind the af:table with binding="#{sampleSelectFlow.organTable}" to my 
bean via property getter and setter I get an exception if the Scope is not 
EVENT.

How do I do this correctly? I tried also @In(required=false) 
@Out(required=false) but then I got an NPE when trying to access the table 
(seems like they were not injected)

thank you very much for your answers
ido

my bean looks like this:

  | @Stateful
  | @Name("sampleSelectFlow")
  | @Scope(ScopeType.CONVERSATION)
  | @Interceptors(SeamInterceptor.class)
  | @Conversational(ifNotBegunOutcome="end")
  | public class SampleSelectFlow implements SampleSelect {
  |      UIXTable organTable;
  |  
  |     @DataModel
  |      private List<Organ> organList;
  |      @DataModelSelection(value="organList")
  |      private Organ organ;
  |     
  |     @PersistenceContext
  |      private EntityManager em;
  |  
  |      @Begin(join=true)
  |      @Factory("organList")
  |      public void loadOrganList(){   
  |             organList = em....
  |      } 
  | 
  |      public void filterOrgan(){
  |             //dosomething:
  |         organTable.getSelectionState().getKeySet();
  |     .....
  |      }
  |      
  |      @Destroy @Remove
  |      public void remove() {}
  | 
  |      public UIXTable getOrganTable() {
  |             return organTable;
  |      }
  |      
  |       public void setOrganTable(UIXTable organTable) {
  |             this.organTable = organTable;           
  |       }
  | }
  | 

  | <af:form>
  |      <af:table binding="#{sampleSelectFlow.organTable}" emptyText="nothing 
there" var="organ" value="#{organList}">
  |           <f:facet name="selection">
  |                     <af:tableSelectMany text="Filter Sample">
  |                         <af:commandButton text="Filter" 
action="#{sampleSelectFlow.filterOrgan}">
  |                                <!--f:param name="conversationId" 
value="new"/--> 
  |                          </af:commandButton>
  |                      </af:tableSelectMany>
  |       </f:facet>
  |         <af:column headerText="Organ" sortProperty="organname" 
sortable="false">
  |         <af:outputText value="#{organ.organname}" />
  |     </af:column>
  |      </af:table>
  | </af:form>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928282#3928282

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928282


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to