1 Reply Latest reply on Jun 17, 2008 4:20 AM by Sergey Smirnov

    command link doent work in datatable after sorting column

    betul aydin Newbie

      Hi I developed simple application.I use richfaces 3.2.1 sr1+jsf 1.2 on myeclipse IDE my problem that the commandlink doesnt work after sorting column.
      here is my code:

      <h:form>
       <h:inputText value="#{De.para}"></h:inputText>
       <rich:dataTable id="tablo" dir="RTL" frame="above" value="#{De.tablo}" var="satir" width="100%" onRowMouseOver="this.style.backgroundColor='#FBF7E6'" onRowMouseOut="this.style.backgroundColor=''" rowKeyVar="de">
      
       <rich:column sortBy="#{satir.ad}">
       <f:facet name="header"><h:outputText value="Kod" /></f:facet>
       <h:commandLink action="#{De.bak1}" styleClass="comlink" >
       <h:outputText value="#{satir.ad}" styleClass="cell" ></h:outputText>
       <f:param name="d" value="#{De.para}"></f:param>
       </h:commandLink>
       </rich:column>
       <rich:column sortBy="#{satir.ad}">
       <f:facet name="header"><h:outputText value="Kod" /></f:facet>
       <h:commandLink action="#{De.bak1}" styleClass="comlink" >
       <h:outputText value="#{satir.soyad}" styleClass="cell" ></h:outputText>
       </h:commandLink>
       </rich:column>
       </rich:dataTable>
      
       </h:form>

      De managed bean code:
      public DataModel getTablo(){
       liste =new ArrayList();
       tablo=new ListDataModel();
       Kol k=new Kol("1","a","1a");
       liste.add(k);
       k=new Kol("4","d","4d");
       liste.add(k);
       k=new Kol("9","g","9g");
       liste.add(k);
       k=new Kol("11","r","11r");
       liste.add(k);
       k=new Kol("3","f","3f");
       liste.add(k);
       k=new Kol("90","t","90t");
       liste.add(k);
       k=new Kol("5","i","5i");
       liste.add(k);
      
      
       tablo.setWrappedData(liste);
       return tablo;
      
       }
      
       public String ba(){
       return "m";
       }
       public void def(){
       this.setDen(this.getDen1());
       }
       public String bak1(){
       System.out.println(this.getPara());
      
       Kol k=(Kol)this.tablo.getRowData();
       System.out.println(k.getAd());
       System.out.println(k.getSoyad());
       System.out.println(k.getKey());
       return "h";
       }

      Can anybody help me?