com.webmethods.caf.faces.bean.nav.xml
Class XMLAppNavBean

java.lang.Object
  extended by com.webmethods.caf.faces.bean.nav.BaseAppNavBean
      extended by com.webmethods.caf.faces.bean.nav.xml.XMLAppNavBean

public class XMLAppNavBean
extends BaseAppNavBean

Web application navigation bean where the page hierarchy is loaded from an XML config file.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.webmethods.caf.faces.bean.nav.BaseAppNavBean
BaseAppNavBean.PagesContentProvider, BaseAppNavBean.SubNavsContentProvider
 
Field Summary
protected  String m_configFile
          XML config file which contains the configuration for this bean.
protected  String m_pageClass
          Name of XMLAppNavPage class to use to build nav hierarchy.
protected  SAXParserFactory m_parserFactory
          SAXParserFactory to create parser instances.
 
Fields inherited from class com.webmethods.caf.faces.bean.nav.BaseAppNavBean
m_current, m_root
 
Constructor Summary
XMLAppNavBean()
          New, uninitialized bean; must be initialized via XMLAppNavBean.setConfigFile(String).
XMLAppNavBean(String configFile)
          Creates a new bean, loading the navigation hierarchy from the specified xml config file.
 
Method Summary
 String getConfigFile()
          Returns the XML config file which contains the configuration for this bean.
 String getPageClass()
          Name of XMLAppNavPage class to use to build nav hierarchy.
protected  SAXParser getParser(FacesContext ctx)
          Creates new parser instance.
 IAppNavPage getRoot()
          Root page of the navigation hierarchy.
 void setConfigFile(String configFile)
          Set the XML config file which contains the configuration for this bean.
 void setPageClass(String pageClass)
          Name of XMLAppNavPage class to use to build nav hierarchy.
 
Methods inherited from class com.webmethods.caf.faces.bean.nav.BaseAppNavBean
createSubNav, createSubNav, createSubNav, findPage, getBreadcrumbs, getCurrent, getDepth, getNextSibling, getPages, getPagesList, getParentNextSibling, getParentPrevSibling, getPrevSibling, getSubNavs, setCurrent, setCurrent, setCurrentById, setRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_parserFactory

protected SAXParserFactory m_parserFactory
SAXParserFactory to create parser instances.


m_configFile

protected String m_configFile
XML config file which contains the configuration for this bean.


m_pageClass

protected String m_pageClass
Name of XMLAppNavPage class to use to build nav hierarchy.

Constructor Detail

XMLAppNavBean

public XMLAppNavBean()
New, uninitialized bean; must be initialized via XMLAppNavBean.setConfigFile(String).


XMLAppNavBean

public XMLAppNavBean(String configFile)
Creates a new bean, loading the navigation hierarchy from the specified xml config file.

Method Detail

getRoot

public IAppNavPage getRoot()
Root page of the navigation hierarchy. Loads hierarchy from the specified config file if necessary.

Overrides:
getRoot in class BaseAppNavBean

getParser

protected SAXParser getParser(FacesContext ctx)
                       throws ParserConfigurationException,
                              SAXException
Creates new parser instance.

Throws:
ParserConfigurationException
SAXException

getConfigFile

public String getConfigFile()
Returns the XML config file which contains the configuration for this bean.


setConfigFile

public void setConfigFile(String configFile)
Set the XML config file which contains the configuration for this bean.


getPageClass

public String getPageClass()
Name of XMLAppNavPage class to use to build nav hierarchy. This class must have a public zero-argument constructor.


setPageClass

public void setPageClass(String pageClass)
Name of XMLAppNavPage class to use to build nav hierarchy. This class must have a public zero-argument constructor.