0 Replies Latest reply on Dec 14, 2012 4:22 AM by Vikash Yadav

    onselectionchange event is not working in rich:extendeddatatable

    Vikash Yadav Newbie

      I am using richfaces 3.3.3 Final and Jsf 1.2 . I have one rich:extendeddatatable to display the data and for pagination i am using  rich:datascroller . So sorting and pagination both combinedly working fine . And onRowClick/onRowDbClick of a row ,  i am getting correct data in managed bean but in case of onselectionchange i am getting always null values . To get the correct value on onselectionchange event i implemented the ExtendedTableDataModel and dataprovider concept and it was working fine but then rich:datascroller (for pagination) is not working. My code snippet is given below

       

      <rich:extendedDataTable id="edtdiary" rows="5" width="100%"

      height="200px" noDataLabel=" " sortMode="single"

      value="#{SomeBean.listOfTotalNotesDetail}" var="item"

      rowKeyVar="row" selection="#{SomeBean.noteSelected}"

      selectionMode="single" styleClass="notesRowHeight"

      enableContextMenu="false">

       

      <a4j:support id="rowclickevent" event="onselectionchange"

      action="#{someAction.onRowSelection}" >

      <f:setPropertyActionListener target="#{SomeBean.selectedCreatedTimeStamp}"

      value="#{item.screatedDate}" />

      </a4j:support>

      <a4j:support id="rowdbclickevent" event="onRowDblClick"

      action="#{someAction.onRowDbSelection}" >

      <f:setPropertyActionListener target="#{SomeBean.selectedCreatedTimeStamp}"

      value="#{item.screatedDate}" />

      </a4j:support>

      <rich:column id="createddate"

      label="createddate" >

      <f:facet name="header">

      <h:panelGrid style="cursor: pointer;width:100%;">

      <h:outputText id="createdDtHeaderLbl" value="createddate" >

      </h:outputText>

      <a4j:support event="onclick" action="#{someAction.sortNotesCreatedDate}">

      </a4j:support>

      </h:panelGrid>

      </f:facet>

      <h:outputText id="txtCreatedDate" value="#{item.screatedDate}" />

      </rich:column>

      </rich:extendedDataTable>

       

      My requirement is to sort the data and do pagination and pass the value from jsf to managed bean on rowclick/rowdbclick/selectionchange event.

      I am not able to achieve all these 3 functionality together in extendeddatatable .Pls Help......

       

      Thanks in advance.