0 Replies Latest reply on Jun 14, 2008 6:27 AM by btl_ayd

    sortable datatable

      Hi
      There is a sortable datatable in my webapplication.here is my datatable tag


      <rich:dataTable id="tablo" value="#{Tanim.tanimtablo}" styleClass="table1" footerClass="foot" headerClass="theader1" rowClasses="row1,row2" var="satir" width="100%" onRowMouseOver="this.style.backgroundColor='#FBF7E6'" onRowMouseOut="this.style.backgroundColor=''" rows="10">
      <rich:column sortBy="#{satir.kod}" sortMode="multiple">
      <f:facet name="header"><h:outputText value="Kod" /></f:facet>
      <h:commandLink action="#{Tanim.araKod}" styleClass="comlink" >
      <h:outputText value="#{satir.kod}" id="out" styleClass="cell" ></h:outputText>
      </h:commandLink>
      </rich:column>
      <rich:column sortBy="#{satir.grup}" sortMode="multiple">
      <f:facet name="header"><h:outputText value="Grup"></h:outputText> </f:facet>
      <h:commandLink action="#{Tanim.araKod}" styleClass="comlink" >
      <h:outputText value="#{satir.grup}" styleClass="cell"></h:outputText>
      </h:commandLink>
      </rich:column>
      <rich:column sortBy="#{satir.testad}" sortMode="multiple">
      <f:facet name="header"><h:outputText value="Test Ad"></h:outputText> </f:facet>
      <h:commandLink action="#{Tanim.araKod}" styleClass="comlink" >
      <h:outputText value="#{satir.testad}" styleClass="cell"></h:outputText>
      </h:commandLink>
      </rich:column>
      <rich:column>
      <f:facet name="header"><h:outputText value="Standart Aralık Şekli"></h:outputText></f:facet>
      <h:outputText value="#{satir.saralik}" styleClass="cell"></h:outputText>
      </rich:column>
      <rich:column>
      <a4j:commandButton id="s" image="img/x.gif" rendered="#{satir.render}" onclick="javascript:Richfaces.showModalPanel('TanimForm:panel')" action="#{Tanim.sil}" reRender="tablo"></a4j:commandButton>
      </rich:column>
      </rich:dataTable>

      when I click command link before sort colunm I have got right value in managed bean. But when I sort column after I click commanlink I have got last value of datatable in managed bean.How can solvwe this problem?