Package org.araneaframework.uilib.form.control

Examples of org.araneaframework.uilib.form.control.TextControl$ViewModel


    addGlobalEventListener(new ProxyEventListener(this));
    setViewSelector("person/editableList");
   
    list = new EditableBeanListWidget(PersonMO.class);
    list.addBeanColumn("id", "#Id", false);
    list.addBeanColumn("name", "#First name", true, new SimpleColumnFilter.Like(), new TextControl());
    list.addBeanColumn("surname", "#Last name", true, new SimpleColumnFilter.Like(), new TextControl());
    list.addBeanColumn("phone", "#Phone no", true, new SimpleColumnFilter.Like(), new TextControl());
    list.addBeanColumn("birthdate", "#Birthdate", true, new SimpleColumnFilter.Equals(), new DateControl());
   
    list.setListDataProvider(buildListDataProvider());
    list.setFormRowHandler(buildFormRowHandler());
View Full Code Here


     
      FormListUtil.addAddButtonToAddForm("#", formList, addForm);
    }
   
    private void addCommonFormFields(FormWidget form) throws Exception {
      form.addElement("name", "#First name", new TextControl(), new StringData(), true);
      form.addElement("surname", "#Last name", new TextControl(), new StringData(), true);
      form.addElement("phone", "#Phone no", new TextControl(), new StringData(), false);
      form.addElement("birthdate", "#Birthdate", new DateControl(), new DateData(), false);
    }
View Full Code Here

 
  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

    setViewSelector("contract/contractNotesEdit");
    log.debug("TemplateContractNotesEditWidget init called");
    addGlobalEventListener(new ProxyEventListener(this));   
   
    form = new FormWidget();
    form.addElement("notes", "#Notes", new TextControl(), new StringData(), true);
    addWidget("form", form);
  }
View Full Code Here

    /* Create a new FormWidget with two self-described input fields. */
    form = new FormWidget();
    // Add the input fields. Arguments taken by addElement() : 
    // String elementName, String labelId, Control control, Data data, boolean mandatory
    form.addElement("username", "#User", new TextControl(), new StringData(), false);
    form.addElement("password", "#Password", new TextControl(), new StringData(), false);

    // attach created form to our widget.
    addWidget("loginForm", form);
  }
View Full Code Here

    setViewSelector(id != null ? "company/companyEdit" : "company/companyAdd");
    log.debug("TemplateCompanyEditWidget init called");
    addGlobalEventListener(new ProxyEventListener(this));   
   
    form = new BeanFormWidget(CompanyMO.class);
    form.addBeanElement("name", "#Name", new TextControl(), true);
    form.addBeanElement("address", "#Address", new TextControl(), true);

    if (id != null) {
      CompanyMO company = (CompanyMO) getGeneralDAO().getById(CompanyMO.class, id);  
      form.writeBean(company);
    }
View Full Code Here

    addGlobalEventListener(new ProxyEventListener(this));
    setViewSelector(id != null ? "person/personEdit" : "person/personAdd");
   
    form = new BeanFormWidget(PersonMO.class);
    form.addBeanElement("name", "#First name", new TextControl(), true);
    form.addBeanElement("surname", "#Last name", new TextControl(), false);
    form.addBeanElement("phone", "#Phone no", new TextControl(), true);
    form.addBeanElement("birthdate", "#Birthdate", new DateControl(), false);

    if (id != null) {
      PersonMO person = (PersonMO) getGeneralDAO().getById(PersonMO.class, id);
      form.writeBean(person);
View Full Code Here

    // 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

      FormListUtil.addAddButtonToAddForm("#", formList, addForm);
    }

    private void addCommonFormFields(FormWidget form) throws Exception {
      form.addElement("stringField", "#String field", new TextControl(), new StringData(), true);
      form.addElement("longField", "#Long field", new NumberControl(), new LongData(), true);
      form.addElement("booleanField", "#Boolean field", new CheckboxControl(), new BooleanData(), true);
    }
View Full Code Here

      FormListUtil.addAddButtonToAddForm("#", editableRows, addForm);
    }

    private void addCommonFormFields(FormWidget form) throws Exception {
      form.addElement("stringField", "#String field", new TextControl(), new StringData(), true);
      form.addElement("longField", "#Long field", new NumberControl(), new LongData(), true);
      form.addElement("booleanField", "#Boolean field", new CheckboxControl(), new BooleanData(), true);
    }
View Full Code Here

TOP

Related Classes of org.araneaframework.uilib.form.control.TextControl$ViewModel

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.