6 Replies Latest reply on Oct 7, 2009 12:17 AM by jsf geeks

    Want sample CRUD application

    jsf geeks Master

      Hi all,

      I am trying to develop a CRUD application in Richfaces with Netbeans and glashfish. I can bind the data from the database to the extendedDataTable like below;

      ArrayList<newlist> list12 = new ArrayList<newlist>(); //with getter-setter
      
      
      // newlist is a class
      public class newlist{
       String a;
       String b;
       String c;
      public newlist(String a1,String b1, String c1){
       this.a=a1;
       this.b=b1;
       this.c=c1;
      }
       public String getA() {
       return a;
       }
       public String getB() {
       return b;
       }
      
       public String getC() {
       return c;
       }
       }
      
      //adding value to the list like;
      while(rs.next()){
       list12.add(new newlist(rs.getString("column_1"), rs.getString("column_2"), rs.getString("column_3")));
      }
      


      And my table is like;
      <rich:extendedDataTable binding="#{backbean.table_1}" value="#{backbean.list12}" var="row" id="table_1" style="left: 15px; top: 65px; position: absolute" onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#FFFFFF'"
       width="660px" height="208px" sortMode="Ascending" rowKeyVar="rowkey"
       selectionMode="multiple" rows="0">
      


      In my table there are columns checkbox and calendar also. I have a button outside the table. Now what I want is, if anyone selectes some of the checkboxes and selects dates for that then clicks on the button to add, at that time I want all the rows with the rowdata which are selected.

      So can anyone tell me what should I do?

      Sorry ilya, but I can't understand from that link. Can you (or anyone) provide me the sample of this type of CRUD application with code?

      Thanks in advance,
      JSF GEEKS