3 Replies Latest reply on Sep 12, 2011 10:45 AM by hantsy bai

    Passing arguments from .xhtml to the method

    Michał M. Newbie


      Hello,


      How can I pass arguments from xList.xhtml to the method in xList.java?


      I tried something like that:


      bookingList.xhtml:




      <rich:dataTable id="bookingListNowMembers" var="_membersList" value="#{_activeConferences.membersList}" rendered="#{not empty _activeConferences.membersList}">
                                   <h:column>
                                       <f:facet name="header"><h:outputText value="Numer"/></f:facet>
                                       <h:outputText value="#{_membersList.callerIdNumber}"/>
                                   </h:column>
                                   <h:column>
                                       <f:facet name="header"><h:outputText value="Czas"/></f:facet>
                                       <h:outputText value="#{_membersList.joinTime}"/>
                                   </h:column>
                                   <h:column>
                                       <f:facet name="header"><h:outputText value="Moderator"/></f:facet>
                                       <h:outputText value="#{_membersList.isModerator}"/>
                                   </h:column>
                                   <h:column>
                                       <f:facet name="header"><h:outputText value="Akcja"/></f:facet>
                                       <s:button  event="onClick" value="Wyrzuć" action="#{bookingList.muteUser(#{_membersList.id})}" reRender="activeConferencesList" ajaxSingle="true" />
                                   </h:column>
      




      BookingList.java:



         public void muteUser(int id) {
            ....
      }



      I want to pass #{_membersList.id} to the muteUser() method.
      But it doesn't work.


      Regards,
      Michał