| com.xoetrope.builder.generic.XGenericBuilder com.xoetrope.builder.pojo.XPojoFormBuilder
XPojoFormBuilder | public class XPojoFormBuilder extends XGenericBuilder (Code) | |
A form builder based upon the GenericBuilder. The builder processes mappings
using reflection to inspect the available properties of a POJO and
creating a form in the process.
Copyright (c) Xoetrope Ltd., 2001-2007, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
|
Constructor Summary | |
public | XPojoFormBuilder(XProject project) Create a new builder. |
XPojoFormBuilder | public XPojoFormBuilder(XProject project)(Code) | | Create a new builder. An attempt is made to configure the builder with a
configuration file when the builder is constructed if the configuration file is
specified as part of the startup properties via the
XGenericBuilderConfig setting.
Parameters: project - the current xui project Parameters: factory - the component factory |
addComponent | protected Object addComponent(PropertyDescriptor pd)(Code) | | Adds an individual component element to the page (this method may be called
recursively for nested elements). Several methods will be attempted until a
component is successfully created. Firstly the built-in component types are
checked, then any additional registered component constructors. The types
can be specified by type ID, type name or class name.
Parameters: childNode - the XML element containing the component specification. the new component |
addComponents | protected void addComponents(Object page, XmlElement model)(Code) | | Adds the elements specified by the Components element and its children
Parameters: page - the new page object Parameters: model - the Components XML element (and implicitly its children) |
getProperty | protected PropertyDescriptor getProperty(String name)(Code) | | Get a named property
Parameters: name - the property name the property descriptor or null if no such named property is found |
getType | public String getType()(Code) | | Get the page loader type - a unique name identifying the loader
"ifnopath" |
loadPage | public PageSupport loadPage(String defPackageName, String pageName, boolean include)(Code) | | Loads an XPage via a reader obtained from the XProject (searches
the classpath). The pageName is assumed to be the name of an Java POJO
class file. For example if the pageName is 'welcome' then the
'Welcome.class' file in the default package is inspected. A full class name
can be specified.
Parameters: defPackageName - the package or path to the page Parameters: pageName - the page name or the name of the class implementing the page Parameters: include - true if the page to be loaded is being included in anotherpage in which case any class attribute of the included page is ignored the page |
readPage | public PageSupport readPage(Reader reader, String pageName, String ext, boolean include)(Code) | | Read an XML description of the page and construct a new XPage. An instance
of the class specified by the class attribute is constructed or else an
instance of XPage if no class attribute is specified. The new page is
populated but is not yet added to its parent.
The startup file parameter 'DefaultClass' is used to obtain a default for
each page's class if a class parameter is not specified in the page's XML
The startup file parameter 'Validations' is used to obtain a default for
each page's set of validation rules
Parameters: reader - a input stream from which to read the page Parameters: pageName - the name of the page Parameters: ext - the file extension Parameters: include - the page to be loaded is being included in another page the page |
setupPage | protected void setupPage(XmlElement model, String pageName, String ext, boolean include)(Code) | | Loads the page based on the contents of the page tag or by using default
values.
Parameters: pageName - the name of the page Parameters: ext - the file extension Parameters: include - the page to be loaded is being included in another page |
Methods inherited from com.xoetrope.builder.generic.XGenericBuilder | public void addBinding(Component targetComp, String srcStr)(Code)(Java Doc) protected Object addComponent(XmlElement childNode)(Code)(Java Doc) protected void addVocabulary(PageSupport page, XmlElement model)(Code)(Java Doc) protected String escape(String srcValue)(Code)(Java Doc) public String getMappedValue(String srcValue, String mapping)(Code)(Java Doc) public String getMappedValue(Component comp, String srcValue)(Code)(Java Doc) public String getType()(Code)(Java Doc) protected InputStream getUrlInputStream(String urlStr)(Code)(Java Doc) protected void init(String packageName)(Code)(Java Doc) public PageSupport loadPage(String defPackageName, String pageName, boolean include)(Code)(Java Doc) public PageSupport readPage(Reader reader, String pageName, String ext, boolean include)(Code)(Java Doc) protected void setComponentAttributes(Component comp, String attribName, String attribValue, XmlElement childNode)(Code)(Java Doc) public void setStyle(Component comp, String value)(Code)(Java Doc) public void setupCommonAttributeMapping(XmlElement mappingNode)(Code)(Java Doc) protected void setupComponentMapping(XmlElement mappingNode)(Code)(Java Doc) public void setupFileTypeHandler(String urlStr)(Code)(Java Doc) protected void setupInstructionMapping(XmlElement mappingNode)(Code)(Java Doc) protected void setupPage(XmlElement model, String pageName, String ext, boolean include)(Code)(Java Doc) public void setupPageLayout(XmlElement componentsNode)(Code)(Java Doc) protected String unescape(String srcValue)(Code)(Java Doc)
|
|
|