Package de.mhus.lib.config

Examples of de.mhus.lib.config.XmlConfig


      res = res.substring(0, pos + 1);
    res = res + resource;
    // log.info("Load Resource: " + res);
    InputStream is = model.getTarget().getClass().getClassLoader()
        .getResourceAsStream(res);
    IConfig document = new XmlConfig(MXml.loadXml(is).getDocumentElement());
    load(document,root);
  }
View Full Code Here


     
      elementHandler.setBaseElement(doc, root);
      parser.parse(new ByteArrayInputStream(xml.getBytes()), elementHandler);
      Element out = elementHandler.first;
      if (out != null) {
        setLayout( new FormLayoutBuilder(this, new XmlConfig(out)));
        return;
      }
    }
   
    setLayout( new FormLayoutSimpleBuilder(this) );
View Full Code Here

      String name = method.getName();
      name = name.substring(3, 4).toLowerCase() + name.substring(4);
      out.setAttribute("name", name);
      out.setAttribute("id", prefix + name);
    }
    return new XmlConfig(out);
  }
View Full Code Here

      ccon.setProperty("user", "sa");
      ccon.setProperty("pass", "");
      cdb.setConfig("connection", ccon);
      config.setConfig("database", cdb);
           
      XmlConfig cdef = new XmlConfig(MXml.loadXml(
      "<applications><application name='content'>"
    + "<definitions><table name='blub' id_column='id' name_column='name'><column name='id' type='string' size='40'/><column name='name' type='string' size='200'/><column name='parent' type='string' size='40'/></table></definitions>"
    + "<element name='root'><query sql='select * from blub_ where parent is null' table='blub' children='sub'/></element>"
    + "<children name='sub'><query sql='select * from blub_ where parent=$id$' table='blub' children='sub'/></children>"
    + "</application></applications>").getDocumentElement());
View Full Code Here

      ccon.setProperty("user", "sa");
      ccon.setProperty("pass", "");
      cdb.setConfig("connection", ccon);
      config.setConfig("database", cdb);
           
      XmlConfig cdef = new XmlConfig(MXml.loadXml(
      "<applications><application name='content' type='adb' schema='de.mhus.lib.test.caodb.BlubSchema'>"
    + "<element name='root'><query table='de.mhus.lib.test.caodb.Blub' qualification='parent is null' children='sub'/></element>"
    + "<children name='sub'><query table='de.mhus.lib.test.caodb.Blub' qualification='parent=$id$' children='sub'/></children>"
    + "</application></applications>").getDocumentElement());
      config.setConfig("applications", cdef);
View Full Code Here

TOP

Related Classes of de.mhus.lib.config.XmlConfig

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.