2 Replies Latest reply on Jul 13, 2009 2:15 PM by Aldo Bonzi

    s:link passes null object to action class

    David Jitendranath Novice

      I have a 'View Detail' link in my rich:dataTable and I'm passing the selected List object to my action class method.  The List object is always null.  Can you please tell me what I'm doing wrong? how I can get this to work?
      Here's my code.


      The view xhtml


      <rich:dataTable id="auditEventFactList"
                      var="_auditEventFact"
                    value="#{auditEventFactList.result}"
                 rendered="true">
                <h:column>
                  <f:facet name="header">Number of attempts</f:facet>
                          <h:outputText value="#{_auditEventFact[0]}"/>
              </h:column>           
              <h:column>
                  <f:facet name="header">User</f:facet>
                          <h:outputText value="#{_auditEventFact[1]}"/>
              </h:column>
              <h:column>
                  <f:facet name="header">Database Name</f:facet>
                          <h:outputText value="#{_auditEventFact[2]}"/>
              </h:column>
                <h:column>
                  <f:facet name="header">Date</f:facet>
                          <h:outputText value="#{_auditEventFact[3]}"/>
              </h:column>                          
              <h:column>
                  <f:facet name="header">User Host</f:facet>
                          <h:outputText value="#{_auditEventFact[4]}"/>
              </h:column>
              <h:column>
                  <f:facet name="header">User Terminal</f:facet>
                          <h:outputText value="#{_auditEventFact[5]}">
                      <f:convertNumber/>
                  </h:outputText>
              </h:column>
              <rich:column styleClass="action">
                  <f:facet name="header">Action</f:facet>  
                     <s:link id="viewAuditFactList" value="View"
                          action="#{auditEventFactList.getAuditEventList(_auditEventFact)}">                                                            
                  </s:link>                                  
              </rich:column>
          </rich:dataTable>



      The action class method



      public void getAuditEventList(List selectedUser){
                System.out.println(selectedUser.size());
                
           }