Package de.mhus.lib.form2

Examples of de.mhus.lib.form2.LayoutModelByConfig


  private HashMap<String, DataSource> packages = new HashMap<String, DataSource>();
  private DataSource defaultSource;
 
  @Override
  public Object getProperty(String name) {
    DataSource pack = getPack(name);
    name = fixName(pack,name);
    return pack.getProperty(name);
  }
View Full Code Here


  protected DataSource getPack(String name) {
    if (name == null) return defaultSource;
    String packName = MString.beforeIndex(name, '.');
    if (packName.length() == 0) return defaultSource;
    DataSource pack = packages.get(packName);
    return pack == null ? defaultSource : pack;
  }
View Full Code Here

    return pack == null ? defaultSource : pack;
  }

  @Override
  public boolean isProperty(String name) {
    DataSource pack = getPack(name);
    name = fixName(pack,name);
    return pack.isProperty(name);
  }
View Full Code Here

    return pack.isProperty(name);
  }

  @Override
  public void removeProperty(String name) throws MException {
    DataSource pack = getPack(name);
    name = fixName(pack,name);
    pack.removeProperty(name);
  }
View Full Code Here

    pack.removeProperty(name);
  }

  @Override
  public void setPropertyData(String name, Object value) throws MException {
    DataSource pack = getPack(name);
    name = fixName(pack,name);
    pack.setProperty(name, value);
  }
View Full Code Here

    packages.remove(name);
  }

  @Override
  public boolean isPropertyPossible(String name) {
    DataSource pack = getPack(name);
    name = fixName(pack,name);
    return pack.isPropertyPossible(name);
  }
View Full Code Here

  }

  private void buildWithPojo(AbstractLayout mainWindow) {
    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);
View Full Code Here

ConfigUtil.dump(model, System.out);

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

      ActivatorControl control = new ActivatorControl();
      control.setFocusManager(new InformationFocus());
     
      PackagingDataSource ds = new PackagingDataSource();
View Full Code Here

      layout.setDataSource(ds);
     
      layout.doBuild();
     
      VaadinFormBuilder builder = new VaadinFormBuilder();
      builder.setFormFactory(new LayoutFactory());
      builder.setRoot(layout.getRoot());
//      builder.getRoot().dump(System.out, 0);
      builder.doBuild();

      builder.getRootComposit().setWidth("800px");
View Full Code Here

      PackagingDataSource ds = new PackagingDataSource();
      ds.setDefaultSource(new MemoryDataSource());
      MyModel pojo = new MyModel();
      ds.addPackage(DataSource.PACKAGE_PERSISTENT, new PojoDataSource(pojo));
     
      LayoutModelByConfig layout = new LayoutModelByConfig();
      layout.setNls(nls);
      layout.setDefinition(model);
      layout.setDataSource(ds);
      layout.setFormControl(control);
      layout.setFormFactory(builder.getFormFactory());
      layout.doBuild();
     
      builder.setRoot(layout.getRoot());
//      builder.getRoot().dump(System.out, 0);
      builder.doBuild();

      builder.getRootComposit().setWidth("800px");
      mainWindow.addComponent(builder.getRootComposit());
View Full Code Here

TOP

Related Classes of de.mhus.lib.form2.LayoutModelByConfig

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.