Package org.araneaframework.uilib.list

Examples of org.araneaframework.uilib.list.BeanListWidget


    putViewData("allowAdd", new Boolean(this.editMode));   
    putViewData("allowRemove", new Boolean(this.editMode));
  }
 
  protected ListWidget initList() throws Exception {
    BeanListWidget temp = new BeanListWidget(PersonMO.class);
    temp.setListDataProvider(new TemplatePersonListDataProvider());
    temp.addBeanColumn("id", "#Id", false);
    temp.addBeanColumn("name", "#First name", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("surname", "#Last name", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("phone", "#Phone no", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("birthdate", "#Birthdate", true, new SimpleColumnFilter.Equals(), new DateControl());
    return temp;
  }
View Full Code Here


  }
 
  protected ListWidget initList() throws Exception {
      // Create the new list widget whose records are JavaBeans, instances of CompanyMO.
    // CompanyMO has fields named id, name and address.
    BeanListWidget temp = new BeanListWidget(CompanyMO.class);
    // set the data provider for the list
    temp.setListDataProvider(new TemplateCompanyListDataProvider());
    // add the displayed columns to list.
    // addBeanColumn(String id, String label, boolean isOrdered)
    // note that # before the label means that label is treated as unlocalized and outputted as-is
    temp.addBeanColumn("id", "#Id", false);
    //addBeanColumn(String id, String label, boolean isOrdered, ColumnFilter filter, Control control)
    temp.addBeanColumn("name", "#Name", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("address", "#Address", true, new SimpleColumnFilter.Like(), new TextControl());
    return temp;
  }
View Full Code Here

    this.list = initList();
    addWidget("list", this.list);
  }
 
  protected ListWidget initList() throws Exception {
    BeanListWidget temp = new BeanListWidget(ContactMO.class);
    temp.setListDataProvider(new DataProvider());
    temp.addBeanColumn("id", "#Id", false);
    temp.addBeanColumn("name.firstname", "#First name", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("name.lastname", "#Last name", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("address.country", "#Country", true, new SimpleColumnFilter.Like(), new TextControl());
    temp.addBeanColumn("address.city", "#City", true, new SimpleColumnFilter.Like(), new TextControl());
    return temp;
  }
View Full Code Here

TOP

Related Classes of org.araneaframework.uilib.list.BeanListWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.