Examples of MFormModel


Examples of de.mhus.lib.form.MFormModel

      FillLayout layout = new FillLayout();
      mainWindow.setLayout(layout);

    MForm target = new Target();
    MFormModel model = new FormModelBuilder( MSingleton.instance().getActivator(), target, FormModelBuilder.DEFAULT_SCHEMA );
    MFormSwtControl control = new MFormSwtControl( model );

    control.createControl(mainWindow);
   
      mainWindow.setText("SWT");
View Full Code Here

Examples of de.mhus.lib.form.MFormModel

 
  public UiModel(MFormModel form) {
    this.form = form;
   
    //MFormModel model = form.getLayout().getModel();
    MFormModel model = form;
    if (model.getLayout() == null)
      try {
        model.setLayout(new FormLayoutSimpleBuilder(model));
      } catch (ParserConfigurationException e) {
        log().e(e);
      }
    layout = model.getLayout();
   
  }
View Full Code Here

Examples of de.mhus.lib.form.MFormModel

    } else
      addPage(new MFormSwtPage(new MFormSwtControl(form), null));
  }

  public void appendPages(MForm target) throws FormException {
    MFormModel form = FormBuilder.buildForm(activator,target, FormModelBuilder.DEFAULT_SCHEMA);
    appendPages(form);
  }
View Full Code Here

Examples of de.mhus.lib.form.MFormModel

public class FormTest extends TestCase {

 
  public void testStaticForm() throws Exception {
    StaticForm target = new StaticForm();
    MFormModel model = new FormModelBuilder( MSingleton.instance().getActivator(), target, FormModelBuilder.DEFAULT_SCHEMA );

    target.setInput("string");
    model.loadFromTarget();
    assertEquals("string", ((FString)model.getElement("input")).getValue());
   
    ((FString)model.getElement("input")).setValue("newstring");
    assertNotSame("set", "newstring", target.getInput());
   
    model.saveToTarget(false);
    assertEquals("newstring", ((FString)model.getElement("input")).getValue());

    try {
      ((FString)model.getElement("input2")).setValue("");
      // should hrow an error
      assertTrue(true);
    } catch (ValidateException e) {
     
    }
   
    try {
      ((FString)model.getElement("input2")).setValue("123456");
      // should hrow an error
      assertTrue(true);
    } catch (ValidateException e) {
     
    }
View Full Code Here

Examples of de.mhus.lib.form.MFormModel

  }
 
  public void testNls() throws Exception {
   
    StaticForm target = new StaticForm();
    MFormModel model = new FormModelBuilder( MSingleton.instance().getActivator(), target, FormModelBuilder.DEFAULT_SCHEMA );

    FObject input = model.getElement("input");
    String inputTitle = input.findTitle();
   
    //assertEquals("TestNlsInput", inputTitle);
   
  }
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.