Package de.mhus.lib.form2.validation

Examples of de.mhus.lib.form2.validation.Validator


  @Override
  public void doBuild() throws Exception {
    PojoModel pojoModel = new PojoParser().parse(pojo).filter(new DefaultFilter()).getModel();
    PackagingDataSource ds = new PackagingDataSource();
    ds.setDefaultSource(new MemoryDataSource());
    ds.addPackage(DataSource.PACKAGE_PERSISTENT, new PojoDataSource(pojo, pojoModel));
    setDataSource(ds);
   
    if (root == null) {
      // looking for models
      for (String actionName : pojoModel.getActionNames()) {
View Full Code Here


    try {
      VaadinFormBuilder builder = new VaadinFormBuilder();
      builder.setFormFactory(new LayoutFactory());
     
      MyModel pojo = new MyModel();
      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
      LayoutModelByPojo layout = new LayoutModelByPojo(pojo);
      layout.setFormControl(control);
      layout.setFormFactory(builder.getFormFactory());
      layout.doBuild();
 
View Full Code Here

      MNls nls = model.createNls();
     
      VaadinFormBuilder builder = new VaadinFormBuilder();
      builder.setFormFactory(new LayoutFactory());

      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
     
      PackagingDataSource ds = new PackagingDataSource();
      ds.setDefaultSource(new MemoryDataSource());
      MyModel pojo = new MyModel();
      ds.addPackage(DataSource.PACKAGE_PERSISTENT, new PojoDataSource(pojo));
View Full Code Here

 
  private void buildFromFiles(Window mainWindow) {
    try {
     
     
      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
     
      LayoutModelByConfig layout = new LayoutModelByConfig();
      layout.setNls(new MNls(MSystem.locateResource(this, "form1.properties").toURI()));
      layout.setDefinition(MConfigFactory.getInstance().createConfigFor(MSystem.locateResource(this, "form1.xml").toURI()));
      layout.setFormControl(control);
View Full Code Here

      VaadinFormBuilder builder = new VaadinFormBuilder();
      builder.setFormFactory(new LayoutFactory());
     
      MyModel pojo = new MyModel();
      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
      LayoutModelByPojo layout = new LayoutModelByPojo(pojo);
      layout.setFormControl(control);
      layout.setFormFactory(builder.getFormFactory());
      layout.doBuild();
 
View Full Code Here

     
      VaadinFormBuilder builder = new VaadinFormBuilder();
      builder.setFormFactory(new LayoutFactory());

      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
     
      PackagingDataSource ds = new PackagingDataSource();
      ds.setDefaultSource(new MemoryDataSource());
      MyModel pojo = new MyModel();
      ds.addPackage(DataSource.PACKAGE_PERSISTENT, new PojoDataSource(pojo));
View Full Code Here

  private void buildFromFiles(Window mainWindow) {
    try {
     
     
      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
     
      LayoutModelByConfig layout = new LayoutModelByConfig();
      layout.setNls(new MNls(MSystem.locateResource(this, "form1.properties").toURI()));
      layout.setDefinition(MConfigFactory.getInstance().createConfigFor(MSystem.locateResource(this, "form1.xml").toURI()));
      layout.setFormControl(control);
View Full Code Here

  protected void doFallback() {
    if (this instanceof LayoutDataElement && name != null) {
      if (sources == null || sources.get(DataSource.CONNECTOR_TASK_DATA) == null) {
        try {
          FmDataSource srcConf = new FmDataSource(name);
          DataConnector con = getDataSource().createDataConnector(this,srcConf);
          if (con != null) {
            if (sources == null) sources = new HashMap<String,DataConnector>();
            sources.put(con.getTaskName(), con);
            con.addObserver(this);
View Full Code Here

  @ALayoutModel
  public DefRoot createModel() throws MException {
    return new DefRoot(
        new FmInformation()
        ,
        new FmText("user",new FmNls("User","Beschreibung 1"),new FmDefaultSources())
        ,
        new FmPassword("password",new FmNls("Password","Beschreibung 2"),new FmDefaultSources())
        ,
        new FmNumber("number",FmNumber.TYPE.INTEGER,new FmNls("text3","Nr3","Beschreibung 3")).format(FmNumber.FORMAT.CURRENCY)
        ,
        new FmCombobox("sex", new FmNls("Sex","Geschlecht"),new FmDefaultSources())
        ).build();
  }
View Full Code Here

    try {
     
      DefRoot model = new DefRoot(
          new FmInformation()
          ,
          new FmText("user",new FmNls("User","Beschreibung 1"),new FmDefaultSources())
          ,
          new FmPassword("password",new FmNls("Password","Beschreibung 2"),new FmDefaultSources())
          ,
          new FmNumber("number",FmNumber.TYPE.INTEGER,new FmNls("text3","Nr3","Beschreibung 3")).format(FmNumber.FORMAT.CURRENCY)
          ,
          new FmCombobox("sex", new FmNls("Sex","Geschlecht"),new FmDefaultSources())
          ).build();

ConfigUtil.dump(model, System.out);

      MNls nls = model.createNls();
View Full Code Here

TOP

Related Classes of de.mhus.lib.form2.validation.Validator

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.