com.ibm.xsp.component
Class UIIncludeComposite

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIPanel
              extended by com.ibm.xsp.component.UIDataPanelBase
                  extended by com.ibm.xsp.component.UIPanelEx
                      extended by com.ibm.xsp.component.UIIncludeComposite
All Implemented Interfaces:
FacesAttrsObject, FacesComponent, FacesDataProvider, FacesPageIncluder, FacesPageProvider, FacesPropertyProvider, FacesDojoComponent, ThemeControl, javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class UIIncludeComposite
extends UIPanelEx
implements javax.faces.component.NamingContainer, FacesPageProvider, FacesPageIncluder, FacesPropertyProvider

The panel-like control used to include a custom control page. Sometimes the UIIncludeComposite will remove itself from the UIComponent tree. That will occur if isAutoRemove() is true (true by default), if the included file has only one component as a child of the view, and if the child component is a FacesParentReliantComponent.

See Also:
the Editable Area control, used in the included custom control page.

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.component.UIComponentBase
javax.faces.component.UIComponentBase.AggregatedIterator, javax.faces.component.UIComponentBase.UnmodifiableIterator
 
Nested classes/interfaces inherited from class javax.faces.component.UIComponent
javax.faces.component.UIComponent.StateMap, javax.faces.component.UIComponent.StateMapEntry
 
Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponentBase
EMPTY_ITERATOR
 
Fields inherited from class javax.faces.component.UIComponent
_xspStateId
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Fields inherited from interface com.ibm.xsp.component.FacesDataProvider
DATA, DATA_CONTEXTS
 
Constructor Summary
UIIncludeComposite()
          Construct a UIIncludeComposite instance
 
Method Summary
 void addNavigationRule(NavigationRule rule)
          Add a NavigationRule instance to the set associated with the view.
 void addResource(Resource resource)
          Add a Resource instance to the set associated with this component.
 void buildContents(javax.faces.context.FacesContext context, FacesComponentBuilder builder)
          Build the component children and facets, the default implementation is usually:
builder.buildAll(context, this, true); // includeFacets=true
 void buildPageContents(javax.faces.context.FacesContext context, FacesComponentBuilder builder)
           
 javax.faces.el.MethodBinding getAfterPageLoad()
           
 javax.faces.el.MethodBinding getBeforePageLoad()
           
 java.lang.String getFamily()
           
 java.lang.String getPageName()
          Return the name of the page which defines this composite component.
 PropertyMap getPropertyMap()
          Return the "compositeData" PropertyMap associated with this component.
 void initAfterContents(javax.faces.context.FacesContext context)
          Perform component initialization after it's children and facets are added.
 void initAfterPageContents(javax.faces.context.FacesContext context)
           
 void initBeforeContents(javax.faces.context.FacesContext context)
          Perform component initialization before its children and facets are added.
 void initBeforePageContents(javax.faces.context.FacesContext context)
          Invoked on the including control when it has been initialized with the page root contents (if importing the root control), but the contents (children & facets) from the page have not yet been built.
 boolean isAutoRemove()
          Defaults to true, set on the custom control tag in the outer XPage.
 boolean isCreateForm()
          Returns true if a form will be created if none already exists, defaults to false, a property set on the custom control tag in the outer page.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAcl(ACL acl)
          This "acl" property, on the root of the included custom control page, behaves the same as the superclass Panel implementation.
 void setAfterPageLoad(javax.faces.el.MethodBinding afterPageLoad)
          Triggered after a page is loaded, or where it is set on an included custom control, triggered after the custom control is included.
 void setAfterRenderResponse(javax.faces.el.MethodBinding afterRenderResponse)
          A server-only event triggered after the render response phase of the JSF lifecycle.
 void setAfterRestoreView(javax.faces.el.MethodBinding afterRestoreView)
          A server-only event triggered after the restore view phase of the JSF lifecycle.
 void setAutoRemove(boolean autoRemove)
          Defaults to true, set on the custom control tag in the outer XPage.
 void setBeforePageLoad(javax.faces.el.MethodBinding beforePageLoad)
          Triggered before a page is loaded, or where it is set on an included custom control, triggered before the custom control is included.
 void setBeforeRenderResponse(javax.faces.el.MethodBinding beforeRenderResponse)
          A server-only event triggered before the render response phase of the JSF lifecycle.
 void setCreateForm(boolean createForm)
          Flag to indicate whether or not a form will be created if none already exists, defaults to false, a property set on the custom control tag in the outer page..
 void setDefaultLinkTarget(java.lang.String defaultLinkTarget)
          Sets the link target for any contained link that does not specify its own target
 void setDir(java.lang.String dir)
          This custom control "dir" property behaves the same as the superclass Panel implementation.
 void setDojoForm(boolean dojoForm)
           
 void setDojoParseOnLoad(boolean dojoParseOnLoad)
          Flag to indicate whether or not the Dojo parser should run when the page is loaded in the web browser or client, defaults to false, will be set on the root of the control tree.
 void setDojoTheme(boolean dojoTheme)
          Flag to indicate whether or not a dojo theme is being used.
 void setEnableModifiedFlag(boolean enableModifiedFlag)
          Flag to indicate whether or not the modified flag is being used.
 void setModifiedControl(java.lang.String modifiedControl)
           
 void setModifiedMessage(java.lang.String modifiedMessage)
           
 void setOnClientLoad(java.lang.String onClientLoad)
          This "onClientLoad" property, on the root of the included custom control page, behaves the same as the superclass Panel implementation.
 void setPageBaseUrl(ViewRootBaseUrl pageBaseUrl)
           
 void setPageDriver(FacesPageDriver pageDriver)
          Deprecated. On 8.5.0 servers, the compiled .java XPage must invoke this method with the current page driver. On 8.5.2 or later servers, it is not required, as the control looks to the current context for the pageDriver. However, the Designer 8.5.2 install still generates the call to this set method, so that include controls from an 8.5.2 Designer will run on an 8.5.0 server.
 void setPageManifest(java.lang.String pageManifest)
           
 void setPageName(java.lang.String name)
          Set the name of the page which defines this composite component, invoked by the outer page's generated .java file.
 
Methods inherited from class com.ibm.xsp.component.UIPanelEx
_xspCleanTransientData, addAttr, addDojoAttribute, getAttrs, getDir, getDojoAttributes, getDojoType, getOnClientLoad, getOuterStyleClass, getRole, getStyle, getStyleClass, getStyleKitFamily, getTagName, getTitle, isDisableOutputTag, setAttrs, setDisableOutputTag, setDojoAttributes, setDojoType, setOuterStyleClass, setRole, setStyle, setStyleClass, setTagName, setTitle
 
Methods inherited from class com.ibm.xsp.component.UIDataPanelBase
addData, addDataContext, afterEncoding, beforeEncoding, broadcast, encodeBegin, encodeEnd, getAcl, getData, getDataContexts, hasUserAccess, invokeOnComponent, isAllowCreateViewPublish, isReadonly, isRendered, processDecodes, processUpdates, processValidators, publishControlData, queueEvent, revokeControlData, setReadonly, visitTree
 
Methods inherited from class javax.faces.component.UIComponentBase
_xspGetReadOnlyObj, _xspGetRendererData, _xspRemoveReadOnlyObj, _xspRemoveRendererData, _xspSetIdUnchecked, _xspSetReadOnlyObj, _xspSetRendererData, addFacesListener, decode, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
_xspGetStateId, _xspGetStateMap, _xspRestoreAttribute, _xspRestoreState, _xspSaveState, isVisitable, markInitialState, setControlState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

RENDERER_TYPE

public static final java.lang.String RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

UIIncludeComposite

public UIIncludeComposite()
Construct a UIIncludeComposite instance

Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIPanel

getPropertyMap

public PropertyMap getPropertyMap()
Description copied from interface: FacesPropertyProvider
Return the "compositeData" PropertyMap associated with this component.

Specified by:
getPropertyMap in interface FacesPropertyProvider
Returns:

addResource

public void addResource(Resource resource)
Add a Resource instance to the set associated with this component.

Specified by:
addResource in interface FacesPageProvider
Parameters:
resource -
See Also:
FacesPageProvider.addResource(com.ibm.xsp.resource.Resource)

addNavigationRule

public void addNavigationRule(NavigationRule rule)
Add a NavigationRule instance to the set associated with the view.

Specified by:
addNavigationRule in interface FacesPageProvider
Parameters:
rule -
See Also:
FacesPageProvider.addNavigationRule(NavigationRule)

setAfterRenderResponse

public void setAfterRenderResponse(javax.faces.el.MethodBinding afterRenderResponse)
Description copied from interface: FacesPageProvider
A server-only event triggered after the render response phase of the JSF lifecycle. Since it does not occur during processing of the control tree for the phase, the event will not have access to data published by controls in the XPage.

Specified by:
setAfterRenderResponse in interface FacesPageProvider
Parameters:
afterRenderResponse - The afterRenderResponse to set.
See Also:
FacesPageProvider.setAfterRenderResponse(MethodBinding)

setAfterRestoreView

public void setAfterRestoreView(javax.faces.el.MethodBinding afterRestoreView)
Description copied from interface: FacesPageProvider
A server-only event triggered after the restore view phase of the JSF lifecycle. Since it does not occur during processing of the control tree for the phase, the event will not have access to data published by controls in the XPage. There is no "before restore view" phase because these event actions are saved in the view control tree, so the action would not be available before the control tree is restored.

Specified by:
setAfterRestoreView in interface FacesPageProvider
Parameters:
afterRestoreView - The afterRestoreView to set.
See Also:
FacesPageProvider.setAfterRestoreView(MethodBinding)

setBeforeRenderResponse

public void setBeforeRenderResponse(javax.faces.el.MethodBinding beforeRenderResponse)
Description copied from interface: FacesPageProvider
A server-only event triggered before the render response phase of the JSF lifecycle. Since it does not occur during processing of the control tree for the phase, the event will not have access to data published by controls in the XPage.

Specified by:
setBeforeRenderResponse in interface FacesPageProvider
Parameters:
beforeRenderResponse - The beforeRenderResponse to set.
See Also:
FacesPageProvider.setBeforeRenderResponse(MethodBinding)

getAfterPageLoad

public javax.faces.el.MethodBinding getAfterPageLoad()
Returns:
the afterPageLoad action

setAfterPageLoad

public void setAfterPageLoad(javax.faces.el.MethodBinding afterPageLoad)
Description copied from interface: FacesPageProvider
Triggered after a page is loaded, or where it is set on an included custom control, triggered after the custom control is included.

Specified by:
setAfterPageLoad in interface FacesPageProvider
Parameters:
afterPageLoad - the afterPageLoad to set
See Also:
FacesPageProvider.setAfterPageLoad(MethodBinding)

getBeforePageLoad

public javax.faces.el.MethodBinding getBeforePageLoad()
Returns:
the beforePageLoad action

setBeforePageLoad

public void setBeforePageLoad(javax.faces.el.MethodBinding beforePageLoad)
Description copied from interface: FacesPageProvider
Triggered before a page is loaded, or where it is set on an included custom control, triggered before the custom control is included.

Specified by:
setBeforePageLoad in interface FacesPageProvider
Parameters:
beforePageLoad - the beforePageLoad to set
See Also:
FacesPageProvider.setBeforePageLoad(MethodBinding)

setDojoTheme

public void setDojoTheme(boolean dojoTheme)
Flag to indicate whether or not a dojo theme is being used.

Specified by:
setDojoTheme in interface FacesPageProvider
Parameters:
dojoTheme - true is the dojo theme should be used
See Also:
FacesPageProvider.setDojoTheme(boolean)

setDojoParseOnLoad

public void setDojoParseOnLoad(boolean dojoParseOnLoad)
Flag to indicate whether or not the Dojo parser should run when the page is loaded in the web browser or client, defaults to false, will be set on the root of the control tree.

Specified by:
setDojoParseOnLoad in interface FacesPageProvider
Parameters:
dojoParseOnLoad - true is the dojo parser should be triggered on load
See Also:
FacesPageProvider.setDojoParseOnLoad(boolean)

setDefaultLinkTarget

public void setDefaultLinkTarget(java.lang.String defaultLinkTarget)
Sets the link target for any contained link that does not specify its own target


setEnableModifiedFlag

public void setEnableModifiedFlag(boolean enableModifiedFlag)
Flag to indicate whether or not the modified flag is being used.

Specified by:
setEnableModifiedFlag in interface FacesPageProvider
Parameters:
enableModifiedFlag - true if the modified flag should be used.
See Also:
FacesPageProvider.setEnableModifiedFlag(boolean)

setModifiedMessage

public void setModifiedMessage(java.lang.String modifiedMessage)
Specified by:
setModifiedMessage in interface FacesPageProvider
See Also:
FacesPageProvider.setModifiedMessage(java.lang.String)

setModifiedControl

public void setModifiedControl(java.lang.String modifiedControl)
Specified by:
setModifiedControl in interface FacesPageProvider
See Also:
FacesPageProvider.setModifiedControl(java.lang.String)

setDojoForm

public void setDojoForm(boolean dojoForm)
Specified by:
setDojoForm in interface FacesPageProvider
See Also:
FacesPageProvider.setDojoForm(boolean)

setPageBaseUrl

public void setPageBaseUrl(ViewRootBaseUrl pageBaseUrl)
Specified by:
setPageBaseUrl in interface FacesPageProvider
See Also:
FacesPageProvider.setPageBaseUrl(ViewRootBaseUrl)

setPageManifest

public void setPageManifest(java.lang.String pageManifest)
Specified by:
setPageManifest in interface FacesPageProvider
See Also:
FacesPageProvider.setPageManifest(String)

isCreateForm

public boolean isCreateForm()
Returns true if a form will be created if none already exists, defaults to false, a property set on the custom control tag in the outer page.

Returns:
true if a form will be created if none already exists.

setCreateForm

public void setCreateForm(boolean createForm)
Flag to indicate whether or not a form will be created if none already exists, defaults to false, a property set on the custom control tag in the outer page..

Parameters:
createForm - true to create a form if none already exists.

buildContents

public void buildContents(javax.faces.context.FacesContext context,
                          FacesComponentBuilder builder)
                   throws javax.faces.FacesException
Description copied from interface: FacesComponent
Build the component children and facets, the default implementation is usually:
builder.buildAll(context, this, true); // includeFacets=true

Specified by:
buildContents in interface FacesComponent
Overrides:
buildContents in class UIDataPanelBase
Throws:
javax.faces.FacesException

setPageDriver

public void setPageDriver(FacesPageDriver pageDriver)
Deprecated. On 8.5.0 servers, the compiled .java XPage must invoke this method with the current page driver. On 8.5.2 or later servers, it is not required, as the control looks to the current context for the pageDriver. However, the Designer 8.5.2 install still generates the call to this set method, so that include controls from an 8.5.2 Designer will run on an 8.5.0 server.

Parameters:
pageDriver - the current application's pageDriver

getPageName

public java.lang.String getPageName()
Return the name of the page which defines this composite component.


setPageName

public void setPageName(java.lang.String name)
Set the name of the page which defines this composite component, invoked by the outer page's generated .java file.


isAutoRemove

public boolean isAutoRemove()
Defaults to true, set on the custom control tag in the outer XPage.

Returns:
Returns the auto remove flag.

setAutoRemove

public void setAutoRemove(boolean autoRemove)
Defaults to true, set on the custom control tag in the outer XPage.

Parameters:
autoRemove - Set the auto remove flag.

setOnClientLoad

public void setOnClientLoad(java.lang.String onClientLoad)
This "onClientLoad" property, on the root of the included custom control page, behaves the same as the superclass Panel implementation.

Specified by:
setOnClientLoad in interface FacesPageProvider
Overrides:
setOnClientLoad in class UIPanelEx
Parameters:
onClientLoad - client JavaScript to execute when the page loads in the client or browser
See Also:
UIPanelEx.setOnClientLoad(java.lang.String), FacesPageProvider.setOnClientLoad(String)

setDir

public void setDir(java.lang.String dir)
This custom control "dir" property behaves the same as the superclass Panel implementation. The "dir" is set on the custom control in the outer page.

Overrides:
setDir in class UIPanelEx
See Also:
UIPanelEx.setDir(java.lang.String)

setAcl

public void setAcl(ACL acl)
This "acl" property, on the root of the included custom control page, behaves the same as the superclass Panel implementation.

Specified by:
setAcl in interface FacesPageProvider
Overrides:
setAcl in class UIDataPanelBase
See Also:
UIDataPanelBase.setAcl(com.ibm.xsp.acl.ACL), FacesPageProvider.setAcl(ACL)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class UIPanelEx

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class UIPanelEx

initBeforeContents

public void initBeforeContents(javax.faces.context.FacesContext context)
                        throws javax.faces.FacesException
Description copied from interface: FacesComponent
Perform component initialization before its children and facets are added.

Specified by:
initBeforeContents in interface FacesComponent
Overrides:
initBeforeContents in class UIDataPanelBase
Throws:
javax.faces.FacesException

initAfterContents

public void initAfterContents(javax.faces.context.FacesContext context)
                       throws javax.faces.FacesException
Description copied from interface: FacesComponent
Perform component initialization after it's children and facets are added.

Specified by:
initAfterContents in interface FacesComponent
Overrides:
initAfterContents in class UIDataPanelBase
Throws:
javax.faces.FacesException

initBeforePageContents

public void initBeforePageContents(javax.faces.context.FacesContext context)
                            throws javax.faces.FacesException
Description copied from interface: FacesPageIncluder
Invoked on the including control when it has been initialized with the page root contents (if importing the root control), but the contents (children & facets) from the page have not yet been built.

Specified by:
initBeforePageContents in interface FacesPageIncluder
Throws:
javax.faces.FacesException

buildPageContents

public void buildPageContents(javax.faces.context.FacesContext context,
                              FacesComponentBuilder builder)
                       throws javax.faces.FacesException
Specified by:
buildPageContents in interface FacesPageIncluder
Throws:
javax.faces.FacesException

initAfterPageContents

public void initAfterPageContents(javax.faces.context.FacesContext context)
                           throws javax.faces.FacesException
Specified by:
initAfterPageContents in interface FacesPageIncluder
Throws:
javax.faces.FacesException