Class NavigationNodeFactory
java.lang.Object
com.sun.jsftemplating.component.factory.ComponentFactoryBase
org.glassfish.admingui.common.factories.NavigationNodeFactory
- All Implemented Interfaces:
com.sun.jsftemplating.component.factory.ComponentFactory
public class NavigationNodeFactory
extends com.sun.jsftemplating.component.factory.ComponentFactoryBase
The NavigationNodeFactory provides an abstraction layer
for the a tree node component, currently implemented as a Woodstock
treeNode component. This provides the ability to change the treeNode
implementation to another component or set, or a different component
type altogether. The supported attributes are:
id- The ID of the component. While IDs are optional, it is a good idea to provide a specific ID, especially if one expects to want to add nodes under this node in the future.label- The text label for the navigation nodeurl- An optional URLicon- The URL to an image for the tree's root icontarget- An optional target to specify on the link created for this node (e.g., '_blank')expanded- A boolean indicating whether or not this node should be expanded by default.template- An optional parameter which indicates what template should be used to decorate the page to which this node links. The value will be a relative path to a template file provided by the Admin Console or one of its plugins (e.g., '/pluginId/templates/customLayout.xhtml'). The default value is/templates/default.layout. If theurlparameter points to an external resource, the URL rendered will point a page in the admin console. This page will then read the contents of the users-specified URL and display those contents in the appropriate spot in the specified template.processPage- This option is intended to be used in conjunction with thetemplateparameter. By default, the page referred to by the URL will displayed as is. If, however, the plugin author provides a page which does not represent HTML, but instead represents the admin console's native data format, the parameter should be set totrue.
- Author:
- Jason Lee, Ken Paulsen (ken.paulsen@sun.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTheUIComponenttype that must be registered in thefaces-config.xmlfile mapping to the UIComponent class to use for thisUIComponent.static final StringThe attribute name on the TreeNode component that contains the real URL of the content in which to include. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyOption(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent comp, com.sun.jsftemplating.layout.descriptors.LayoutComponent lc, String name, Object value) jakarta.faces.component.UIComponentcreate(jakarta.faces.context.FacesContext context, com.sun.jsftemplating.layout.descriptors.LayoutComponent descriptor, jakarta.faces.component.UIComponent parent) This is the factory method responsible for creating theUIComponent.Methods inherited from class com.sun.jsftemplating.component.factory.ComponentFactoryBase
addChild, createComponent, getExtraInfo, setExtraInfo, setOption, setOptions, storeInstanceHandlers
-
Field Details
-
COMPONENT_TYPE
The
UIComponenttype that must be registered in thefaces-config.xmlfile mapping to the UIComponent class to use for thisUIComponent.- See Also:
-
REAL_URL
The attribute name on the TreeNode component that contains the real URL of the content in which to include. This is only used if the user wishes to take advantage of the admin console templating to add the header and navigation content to their page.
- See Also:
-
-
Constructor Details
-
NavigationNodeFactory
public NavigationNodeFactory()
-
-
Method Details
-
create
public jakarta.faces.component.UIComponent create(jakarta.faces.context.FacesContext context, com.sun.jsftemplating.layout.descriptors.LayoutComponent descriptor, jakarta.faces.component.UIComponent parent) This is the factory method responsible for creating theUIComponent.- Specified by:
createin interfacecom.sun.jsftemplating.component.factory.ComponentFactory- Specified by:
createin classcom.sun.jsftemplating.component.factory.ComponentFactoryBase- Parameters:
context- TheFacesContext.descriptor- TheLayoutComponentdescriptor associated. with the requestedUIComponent.parent- The parentUIComponent.- Returns:
- The newly created
TreeNode.
-
applyOption
-