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 theurl
parameter 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 thetemplate
parameter. 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 ([email protected])
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_TYPE
TheUIComponent
type that must be registered in thefaces-config.xml
file mapping to the UIComponent class to use for thisUIComponent
.static String
REAL_URL
The attribute name on the TreeNode component that contains the real URL of the content in which to include.
-
Constructor Summary
Constructors Constructor Description NavigationNodeFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyOption(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent comp, com.sun.jsftemplating.layout.descriptors.LayoutComponent lc, String name, Object value)
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
.
-
-
-
Field Detail
-
COMPONENT_TYPE
public static final String COMPONENT_TYPE
The
UIComponent
type that must be registered in thefaces-config.xml
file mapping to the UIComponent class to use for thisUIComponent
.- See Also:
- Constant Field Values
-
REAL_URL
public static final String 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:
- Constant Field Values
-
-
Method Detail
-
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 the
UIComponent
.- Specified by:
create
in interfacecom.sun.jsftemplating.component.factory.ComponentFactory
- Specified by:
create
in classcom.sun.jsftemplating.component.factory.ComponentFactoryBase
- Parameters:
context
- TheFacesContext
.descriptor
- TheLayoutComponent
descriptor associated. with the requestedUIComponent
.parent
- The parentUIComponent
.- Returns:
- The newly created
TreeNode
.
-
-