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

java.lang.Object
  extended by com.webmethods.caf.faces.bean.nav.xml.XMLAppNavPage
All Implemented Interfaces:
IAppNavPage, INode

public class XMLAppNavPage
extends Object
implements IAppNavPage

IAppNavPage implementation intended to be constructed from an xml configuration file.


Field Summary
protected  List m_children
          List of IAppNavPage children.
protected  String m_id
          Page id (ex "/myfolder/myview.view").
protected  IAppNavPage m_parent
          IAppNavPage parent.
protected  String m_resourceBundle
          Resource bundle name (ex "app.MyResources").
protected  String m_resourceKey
          Title resource key (ex "page.title.myview").
protected  String m_title
          Page title (ex "Bar View").
protected  String m_url
          Page url (ex "/mycontext/myfolder/myview.view").
 
Constructor Summary
XMLAppNavPage()
           
 
Method Summary
 void addChild(IAppNavPage child)
          Adds the specified page to this page's list of children.
 List getChildren()
          List of IAppNavPage children, in order.
 Object getData()
          This IAppNavPage.
 String getId()
          Page id (ex "/myfolder/myview.view").
 List getPageChildren()
          List of IAppNavPage children, in order (convenience version of XMLAppNavPage.getChildren()).
 IAppNavPage getPageParent()
          IAppNavPage parent (convenience version of XMLAppNavPage.getParent()).
 INode getParent()
          IAppNavPage parent.
 String getResourceBundle()
          Returns resource bundle name (ex "app.MyResources").
 String getResourceKey()
          Returns title resource key (ex "page.title.myview").
 String getTitle()
          Page title (ex "Bar View").
 String getUrl()
          Page url (ex "/mycontext/myfolder/myview.view").
 void setId(String id)
          This IAppNavPage.
 void setPageChildren(List children)
          List of IAppNavPage children, in order (convenience version of XMLAppNavPage.getChildren()).
 void setPageParent(IAppNavPage parent)
          IAppNavPage parent (convenience version of XMLAppNavPage.getParent()).
 void setResourceBundle(String bundle)
          Sets resource bundle name (ex "app.MyResources").
 void setResourceKey(String key)
          Sets title resource key (ex "page.title.myview").
 void setTitle(String title)
          Page title (ex "Bar View").
 void setUrl(String url)
          Page url (ex "/mycontext/myfolder/myview.view").
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_id

protected String m_id
Page id (ex "/myfolder/myview.view").


m_url

protected String m_url
Page url (ex "/mycontext/myfolder/myview.view").


m_title

protected String m_title
Page title (ex "Bar View").


m_resourceKey

protected String m_resourceKey
Title resource key (ex "page.title.myview").


m_resourceBundle

protected String m_resourceBundle
Resource bundle name (ex "app.MyResources").


m_parent

protected IAppNavPage m_parent
IAppNavPage parent. Null for root.


m_children

protected List m_children
List of IAppNavPage children.

Constructor Detail

XMLAppNavPage

public XMLAppNavPage()
Method Detail

getData

public Object getData()
This IAppNavPage.

Specified by:
getData in interface IAppNavPage
Specified by:
getData in interface INode

getId

public String getId()
Page id (ex "/myfolder/myview.view").

Specified by:
getId in interface IAppNavPage
Specified by:
getId in interface INode

getParent

public INode getParent()
IAppNavPage parent. Null if root page.

Specified by:
getParent in interface IAppNavPage
Specified by:
getParent in interface INode

getChildren

public List getChildren()
List of IAppNavPage children, in order. Empty list (non-null) for leaf pages.

Specified by:
getChildren in interface IAppNavPage
Specified by:
getChildren in interface INode

getUrl

public String getUrl()
Page url (ex "/mycontext/myfolder/myview.view"). If the url is not configured, the url is generated by calling ViewHandler on the page id (usually, this prefixes the id with the web application's context path).

Specified by:
getUrl in interface IAppNavPage

getTitle

public String getTitle()
Page title (ex "Bar View"). If a resource bundle and key are configured (see XMLAppNavPage.setResourceBundle(String) and XMLAppNavPage.setResourceKey(String)), the title is generated from the keyed resource. If only a resource bundle is configured the title is generated from the resource keyed by the page id. If no resource bundle is configured, the configured title is returned.

Specified by:
getTitle in interface IAppNavPage

getPageParent

public IAppNavPage getPageParent()
IAppNavPage parent (convenience version of XMLAppNavPage.getParent()). Null if root page.

Specified by:
getPageParent in interface IAppNavPage

getPageChildren

public List getPageChildren()
List of IAppNavPage children, in order (convenience version of XMLAppNavPage.getChildren()). Empty list (non-null) for leaf pages.

Specified by:
getPageChildren in interface IAppNavPage

addChild

public void addChild(IAppNavPage child)
Adds the specified page to this page's list of children.


setId

public void setId(String id)
This IAppNavPage.


setUrl

public void setUrl(String url)
Page url (ex "/mycontext/myfolder/myview.view"). If not configured, the url will be autogenerated (see XMLAppNavPage.getUrl()).


setTitle

public void setTitle(String title)
Page title (ex "Bar View"). The title may be autogenerated (see XMLAppNavPage.getTitle()).


getResourceBundle

public String getResourceBundle()
Returns resource bundle name (ex "app.MyResources").


setResourceBundle

public void setResourceBundle(String bundle)
Sets resource bundle name (ex "app.MyResources").


getResourceKey

public String getResourceKey()
Returns title resource key (ex "page.title.myview").


setResourceKey

public void setResourceKey(String key)
Sets title resource key (ex "page.title.myview").


setPageParent

public void setPageParent(IAppNavPage parent)
IAppNavPage parent (convenience version of XMLAppNavPage.getParent()). Null if root page.


setPageChildren

public void setPageChildren(List children)
List of IAppNavPage children, in order (convenience version of XMLAppNavPage.getChildren()). Empty list (non-null) for leaf pages.