pagecode
Class PageCodeBase

java.lang.Object
  extended by pagecode.PageCodeBase
Direct Known Subclasses:
Help

public abstract class PageCodeBase
extends Object

Provides a common base class for all generated Page Code files.


Constructor Summary
PageCodeBase()
           
 
Method Summary
static javax.faces.component.UIComponent findComponent(javax.faces.component.UIComponent base, String id)
          Return the UIComponent (if any) with the specified id, searching recursively starting at the specified base, and examining the base component itself, followed by examining all the base component's facets and children.
static javax.faces.component.UIComponent findComponentInRoot(String id)
           
 Map getApplicationScope()
           
 javax.faces.context.FacesContext getFacesContext()
           
protected  Object getManagedBean(String mgdBeanName)
          Return the managed bean with the given name
protected static String getRealPath(String relPath)
          Returns a full system path for a file path given relative to the web project
 Map getRequestParam()
           
 Map getRequestScope()
           
protected static InputStream getResourceInputStream(String relPath)
          Returns an InputStream for a resource at the given path
 Map getSessionScope()
           
protected  Object getTreeAttribute(String key)
          Retrieve an Object from the tree's attribute map
protected  void gotoPage(String pageName)
           
protected  void log(String message)
           
protected  void logException(Throwable throwable)
           
protected  void putTreeAttribute(String key, Object value)
          Place an Object on the tree's attribute map
protected  Object resolveExpression(String expression)
          Return the result of the resolved expression
protected  void resolveParams(Map paramMap, String[] argNames, String[] argValues, String cacheMapKey)
          Resolve all parameters passed in via the argNames/argValues array pair, and add them to the provided paramMap.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageCodeBase

public PageCodeBase()
Method Detail

gotoPage

protected void gotoPage(String pageName)

findComponent

public static javax.faces.component.UIComponent findComponent(javax.faces.component.UIComponent base,
                                                              String id)

Return the UIComponent (if any) with the specified id, searching recursively starting at the specified base, and examining the base component itself, followed by examining all the base component's facets and children. Unlike findComponent method of UIComponentBase, which skips recursive scan each time it finds a NamingContainer, this method examines all components, regardless of their namespace (assuming IDs are unique).

Parameters:
base - Base UIComponent from which to search
id - Component identifier to be matched

findComponentInRoot

public static javax.faces.component.UIComponent findComponentInRoot(String id)

putTreeAttribute

protected void putTreeAttribute(String key,
                                Object value)
Place an Object on the tree's attribute map

Parameters:
key -
value -

getTreeAttribute

protected Object getTreeAttribute(String key)
Retrieve an Object from the tree's attribute map

Parameters:
key -
Returns:
Object object to fetch

resolveExpression

protected Object resolveExpression(String expression)
Return the result of the resolved expression

Parameters:
expression -
Returns:
Object result of expression evaluation

getManagedBean

protected Object getManagedBean(String mgdBeanName)
Return the managed bean with the given name

Parameters:
mgdBeanName - the name of the managed bean to retrieve
Returns:
Object manage bean instance

resolveParams

protected void resolveParams(Map paramMap,
                             String[] argNames,
                             String[] argValues,
                             String cacheMapKey)
Resolve all parameters passed in via the argNames/argValues array pair, and add them to the provided paramMap. If a parameter can not be resolved, then it will attempt to be retrieved from a cachemap stored using the cacheMapKey

Parameters:
paramMap -
argNames -
argValues -
cacheMapKey -

getRealPath

protected static String getRealPath(String relPath)
Returns a full system path for a file path given relative to the web project


getResourceInputStream

protected static InputStream getResourceInputStream(String relPath)
Returns an InputStream for a resource at the given path


logException

protected void logException(Throwable throwable)

log

protected void log(String message)

getApplicationScope

public Map getApplicationScope()

getFacesContext

public javax.faces.context.FacesContext getFacesContext()

getRequestParam

public Map getRequestParam()

getRequestScope

public Map getRequestScope()

getSessionScope

public Map getSessionScope()


Copyright © 2011. All Rights Reserved.