|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.xoetrope.xui.XPageManager
public class XPageManager
A class for loading and displaying XPages. This class manages access to individual pages and coordinates update of the dispaly area. Pages can also be displayed as part of a frameset. The page manager caches the pages to improve performance and maintain state.
Copyright (c) Xoetrope Ltd., 2002-2003
License: see license.txt
$Revision: 2.16 $Field Summary | |
---|---|
protected java.lang.String |
packageName The component package being used in this XProject instance (AWT or Swing) |
protected XPageDisplay |
pageDisplay XPageDisplay interface for showing pages |
protected java.util.Stack |
pageHistory The pageHistory Stack used to go 'back' |
protected java.util.Hashtable |
pages Hashtable cache of used XPage Objects |
protected XPageLoader |
secondaryLoader Used to load pages from XML definition |
Constructor Summary | |
---|---|
XPageManager() Constructor which creates a hastable to store the pages |
Method Summary | |
---|---|
void |
addHistory(java.lang.String className) Add the page to the pageHistory stack |
PageSupport |
getCurrentPage(java.lang.String target) Get the page currently displayed by a particular target container |
XPageManager |
getInstance() Deprecated. since 1.0.3 use XProjectManager.getCurrentProject().getPageManager() or XProjectManager.getPageManager() |
int |
getNumTargets() Get the number of frame/target from the current frameset |
PageSupport |
getPage(java.lang.String className) Get a page |
PageSupport |
getPreviousPage() Get the page previously displayed by the 'content' target container |
java.lang.Object |
getTarget(int idx) Get the target for a page display request |
java.lang.Object |
getTarget(java.lang.String name) Get a named frame/target from the current frameset |
void |
loadFrames(java.lang.String frameSetName, boolean useFrames) Loads a frameset. |
PageSupport |
loadPage(java.lang.String className) Load a page. |
PageSupport |
loadPage(java.lang.String className, boolean cache) Load a page. |
protected void |
logPageCreationError(java.lang.String className, java.lang.String message, java.lang.Exception e) Log the page creation error message |
void |
reset() Reset the page history and dump any loaded pages. |
void |
setPackageName(java.lang.String pkgName) Set the package name. |
void |
setPageDisplay(XPageDisplay pgDisplay) Set the interface to invoke when a page has been displayed. |
void |
setSecondaryLoader(XPageLoader pl) Set the page loader class. |
PageSupport |
showPage(java.lang.String className) Load and show a page. |
PageSupport |
showPage(java.lang.String className, java.lang.String target) Load and show a page. |
PageSupport |
showPrevious() Show the previously displayed page. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable pages
protected java.lang.String packageName
protected java.util.Stack pageHistory
protected XPageDisplay pageDisplay
protected XPageLoader secondaryLoader
Constructor Detail |
---|
public XPageManager()
Method Detail |
---|
public void setPackageName(java.lang.String pkgName)
pkgName
- the name of the package we're running from.public void setPageDisplay(XPageDisplay pgDisplay)
pgDisplay
- The XPageDisplay interfacepublic PageSupport loadPage(java.lang.String className)
className
- the name of the class we want to load. If the new page is a dialog or a dialog derivative it is not cachedpublic PageSupport loadPage(java.lang.String className, boolean cache)
className
- the name of the class we want to load.cache
- whether or not to cache the page, or check the class being cachedprotected void logPageCreationError(java.lang.String className, java.lang.String message, java.lang.Exception e)
message
- the error messagee
- the exceptionpublic void loadFrames(java.lang.String frameSetName, boolean useFrames)
frameSetName
- the name of the frameSet we want to load.useFrames
- true to setup the frameset or false to add just a single target areapublic XPageManager getInstance()
public PageSupport getPage(java.lang.String className)
className
- the page namepublic PageSupport getCurrentPage(java.lang.String target)
target
- the target container namepublic PageSupport getPreviousPage()
public PageSupport showPage(java.lang.String className)
className
- The name, without package info, of the page to be displayedpublic PageSupport showPage(java.lang.String className, java.lang.String target)
className
- The name, without package info, of the page to be displayedtarget
- the area to updatepublic PageSupport showPrevious()
public void setSecondaryLoader(XPageLoader pl)
pl
- the page loader instancepublic java.lang.Object getTarget(java.lang.String name)
name
- the name of the framepublic int getNumTargets()
public java.lang.Object getTarget(int idx)
idx
- the target areapublic void addHistory(java.lang.String className)
className
- The name, without package info, of the page to be displayedpublic void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |