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 the url
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 the template
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 to true
.Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_TYPE
The
UIComponent type that must be registered in the
faces-config.xml file mapping to the UIComponent class
to use for this UIComponent . |
static String |
REAL_URL
The attribute name on the TreeNode component that contains the real
URL of the content in which to include.
|
Constructor and Description |
---|
NavigationNodeFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyOption(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent comp,
com.sun.jsftemplating.layout.descriptors.LayoutComponent lc,
String name,
Object value) |
javax.faces.component.UIComponent |
create(javax.faces.context.FacesContext context,
com.sun.jsftemplating.layout.descriptors.LayoutComponent descriptor,
javax.faces.component.UIComponent parent)
This is the factory method responsible for creating the
UIComponent . |
public static final String COMPONENT_TYPE
The UIComponent
type that must be registered in the
faces-config.xml
file mapping to the UIComponent class
to use for this UIComponent
.
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.
public javax.faces.component.UIComponent create(javax.faces.context.FacesContext context, com.sun.jsftemplating.layout.descriptors.LayoutComponent descriptor, javax.faces.component.UIComponent parent)
This is the factory method responsible for creating the
UIComponent
.
create
in interface com.sun.jsftemplating.component.factory.ComponentFactory
create
in class com.sun.jsftemplating.component.factory.ComponentFactoryBase
context
- The FacesContext
.descriptor
- The LayoutComponent
descriptor associated.
with the requested UIComponent
.parent
- The parent UIComponent
.TreeNode
.Copyright © 2019. All rights reserved.