Examples of TextControl


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

      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

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

 
  setViewSelector("sample/simpleForm/component");

    simpleForm = new FormWidget();
   
    FormElement el = simpleForm.createElement("#Textbox", new TextControl(), new StringData(), false);
   
    simpleForm.addElement("checkbox1", "#Checkbox", new CheckboxControl(), new BooleanData(), false);
    simpleForm.addElement("textbox1", el);
    simpleForm.addElement("button1", "#Button", new ButtonControl(), null, false);
    addWidget("simpleForm", simpleForm);
View Full Code Here

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

    addGlobalEventListener(new ProxyEventListener(this));
 
    searchForm = new FormWidget();

    //Adding form controls
    searchForm.addElement("clientFirstName", "#Client first name", new TextControl(), new StringData(), false);
    searchForm.addElement("clientLastName", "#Client last name", new TextControl(), new StringData(), false);

    searchForm.addElement("clientPersonalId", "#Client personal id", new TextControl(TextType.EST_PERSONAL_ID), new StringData(), false);
   
    searchForm.addElement("clientAddressTown", "#Town", new TextControl(), new StringData(), false);
    searchForm.addElement("clientAddressStreet", "#Street", new TextControl(), new StringData(), false);
    searchForm.addElement("clientAddressHouse", "#House", new TextControl(), new StringData(), false);      
   
    searchForm.addElement("search", "#Search", new ButtonControl(), null, false);

    //
    //Complex constraint
View Full Code Here

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

 
  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

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

    FormWidget voForm = new FormWidget();
    voForm._getComponent().init(new MockEnviroment());
   
    //Adding elements to form
    voForm.addElement("booleanValue", "vo checkbox", new CheckboxControl(), new BooleanData(), true);
    voForm.addElement("stringValue", "vo text", new TextControl(), new StringData(), true);
    voForm.addElement("longValue", "vo long", new TextControl(), new LongData(), true);

    //Adding a composite element
    FormWidget subTestVO = voForm.addSubForm("subTestVO");
    subTestVO.addElement("booleanValue", "vo checkbox", new CheckboxControl(), new BooleanData(), true);
    subTestVO.addElement("stringValue", "vo text", new TextControl(), new StringData(), true);
    subTestVO.addElement("longValue", "vo long", new TextControl(), new LongData(), true);

    return voForm;
  }
View Full Code Here

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

    FormElement sfe = new FormElement();
   
    sfe._getComponent().init(new MockEnviroment());
   
    TextControl tb = new TextControl();
    tb.setMandatory(true);
   
    sfe.setControl(tb);
    sfe.setData(new LongData());
    sfe.setConverter(new StringToLongConverter());
   
View Full Code Here

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

    FormWidget testForm = new FormWidget();
    testForm._getComponent().init(new MockEnviroment());
   
    //Adding elements to form
    testForm.addElement("myCheckBox", "my checkbox", new CheckboxControl(), new BooleanData(), true);
    testForm.addElement("myLongText", "my long text", new TextControl(), new LongData(), true);
    testForm.addElement("myDateTime", "my date and time", new DateTimeControl(), new DateData(), false);
    testForm.addElement("myButton", "my button", new ButtonControl(), null, false);

    //Adding a composite element
    FormWidget hierarchyTest = testForm.addSubForm("hierarchyTest");
View Full Code Here

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

    FormWidget testForm = new FormWidget();
    testForm._getComponent().init(new MockEnviroment());
   
    //Adding elements to form
    testForm.addElement("myCheckBox", "my checkbox", new CheckboxControl(), new BooleanData(), true);
    testForm.addElement("myLongText", "my long text", new TextControl(), new LongData(), false);
    testForm.addElement("myDateTime", "my date and time", new DateTimeControl(), new DateData(), false);
    testForm.addElement("myButton", "my button", new ButtonControl(), null, false);

    return testForm;
  }
View Full Code Here

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

   */
  public void testTextboxOnEmptyRequest() throws Exception {
    MockHttpServletRequest emptyRequest = new MockHttpServletRequest();
    emptyRequest.addParameter("myTextBox", "");

    TextControl tb = new TextControl();  
    tb._getComponent().init(new MockEnviroment());
    MockUiLibUtil.emulateHandleRequest(tb, "myTextBox", emptyRequest);
    tb.convertAndValidate();

    assertNull("TextBox must return null on empty request.", tb.getRawValue());

    tb._getComponent().destroy();
  }
View Full Code Here

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

   
    String DEV_NULL = "/dev/null";
   
    valueRequest.addParameter("myTextBox", DEV_NULL);

    TextControl tb = new TextControl();
    tb._getComponent().init(new MockEnviroment());
    MockUiLibUtil.emulateHandleRequest(tb, "myTextBox", valueRequest);
    StringArrayRequestControl.ViewModel vm = (StringArrayRequestControl.ViewModel) tb._getViewable().getViewModel();
   
    assertEquals("TextBox must contain the value from request!", DEV_NULL, vm.getSimpleValue());
   
    tb._getComponent().destroy();
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.