net.xoetrope.xui
Interface XPageLoader

All Known Implementing Classes:
XHtmlBuilder, XuiBuilder

public interface XPageLoader

An interface used by the XPageLoader to load pages

Copyright (c) Xoetrope Ltd., 2002-2003

License: see license.txt

$Revision: 2.4 $


Method Summary
 boolean loadFrames(java.lang.String packageName, java.lang.String pageName, XPageDisplay pageDisplay, boolean useFrames)
          Loads a frameset
 PageSupport loadPage(java.lang.String packageName, java.lang.String pageName, boolean include)
          Loads an XPage
 PageSupport readPage(java.io.Reader reader, java.lang.String pageName, java.lang.String ext, boolean include)
          Read an XML description of the page and construct a new XPage.
 void setClassLoader(java.lang.ClassLoader cl)
          Set a secondary classloader for loading the classes referenced by pages
 void setPackageName(java.lang.String packageName)
          Set the default package name to use for loading pages and components
 void setPage(PageSupport p)
          Set the current page
 

Method Detail

loadPage

PageSupport loadPage(java.lang.String packageName,
                     java.lang.String pageName,
                     boolean include)
Loads an XPage

Parameters:
packageName - the package or path to the page
pageName - the page name or the name of the class implementing the page
include - the page to be loaded is being included in another page
Returns:
the page

loadFrames

boolean loadFrames(java.lang.String packageName,
                   java.lang.String pageName,
                   XPageDisplay pageDisplay,
                   boolean useFrames)
Loads a frameset

Parameters:
packageName - the package or path to the page
pageName - the page name or the name of the class implementing the page
pageDisplay - the object that will display the pages and frameset
useFrames - true to setup the frameset or false to add just a single target area
Returns:
true if a frameset is loaded

setPackageName

void setPackageName(java.lang.String packageName)
Set the default package name to use for loading pages and components

Parameters:
packageName - the package or path to the page

setClassLoader

void setClassLoader(java.lang.ClassLoader cl)
Set a secondary classloader for loading the classes referenced by pages

Parameters:
cl - the class loader

setPage

void setPage(PageSupport p)
Set the current page

Parameters:
p - the page object
Since:
3.0

readPage

PageSupport readPage(java.io.Reader reader,
                     java.lang.String pageName,
                     java.lang.String ext,
                     boolean include)
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
pageName - the name of the page
ext - the file extension
include - the page to be loaded is being included in another page
Returns:
the page