public abstract class IlvDHTMLRenderer extends javax.faces.render.Renderer implements Serializable, IlvDHTMLConstants, IlvFacesConstants
IlvDHTMLRenderer
is the base class for the JViews Faces
DHTML renderers. This class implements the dependency and script managing
mechanisms. Each subclass must do the following:
encodeEnd
methodsuper.codeEnd
methodemitXXX
method in the correct orderemitXXX
method to perform its own rendering.Modifier and Type | Field and Description |
---|---|
static IlvScriptDescriptor |
scriptDescriptor
Returns the script descriptor of the renderer.
|
ACCESSIBLE, ACTION_NAME, AUTO_SUBMIT, BACKGROUND_COLOR, CAPABILITIES_LOADED_HANDLER, COMPONENT, DO_ACTION_ON_BG_DESELECT, ERROR_MESSAGE, GENERATE_IMAGE_MAP, HOTKEYS, IMAGE_FORMAT, IMAGE_LOADED_HANDLER, IMAGE_MAP_GENERATOR, IMAGE_MAP_GENERATOR_CLASS, IMAGE_MAP_VISIBLE, IMAGE_SERVLET_CONTEXT, INVOCATION_CONTEXT, JSF_CONTEXT, ON_CLICK, ON_SELECTION_CHANGED, PARTIAL_SUBMIT, PORTLET_CONTEXT_KEY, PORTLET_SESSION_KEY, REPLACE_PATTERN, RESIZABLE, SELECTION_RESIZABLE_CLASS, SESSION_EXP_HANDLER, SUBMITTED_VALUE, WAITING_IMAGE
AFTER_HANDLER, BASETEXTDIRECTION, BEFORE_HANDLER, BUTTON_GROUP_ID, BUTTON_TYPE, CHARTS_BUNDLE, CHARTS_MESSAGE_BUNDLE, CORE_BUNDLE, CORE_MESSAGE_BUNDLE, CURSOR, DATA, DECODED_PROPERTY, DEFAULT_LINE_COLOR, DELETION_ALLOWED, DIAGRAMMER_BUNDLE, DIAGRAMMER_MESSAGE_BUNDLE, ENABLED, EVENT_TYPE, FILL_ON, FORCE_UPDATE_PROPERTIES, FRAMEWORK_BUNDLE, FRAMEWORK_MESSAGE_BUNDLE, GANTT_BUNDLE, GANTT_MESSAGE_BUNDLE, HEIGHT, IMAGE, IMAGE_MODE, INFO_PROVIDER_MB, INT_NOT_DEFINED, INTERACTORS, INTERCEPT_INTERACTOR, ITEM_DISABLED_STYLE_CLASS, ITEM_HIGHLIGHTED_STYLE_CLASS, ITEM_STYLE_CLASS, LINE_COLOR, LINE_WIDTH, MAPS_BUNDLE, MAPS_MESSAGE_BUNDLE, MENU_MODEL_ID, MESSAGE, MESSAGE_BOX, MESSAGE_BOX_ID, MOVE_ALLOWED, OBJECT_FINDER, PARAM_COMPID, PARAM_DATA, PARAM_KEY, PARAM_NAMESPACE, PARAM_RESOURCE, PARAM_SERVICE, PARAM_TYPE, POPUP_MENU, POPUP_MENU_FACTORY, POPUP_MENU_FACTORY_CLASS, PORTLET_NAMESPACE, PROGRESSIVE_ZOOM, PROJECT, RENDER, RESOURCES_PATH, RESOURCES_PATH_PREFIX, ROLLOVER_IMAGE, SCROLL_BAR, SELECTED, SELECTED_IMAGE, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVLET, SERVLET_CLASS, SERVLET_URL, STYLE, STYLE_CLASS, TGO_BUNDLE, TGO_MESSAGE_BUNDLE, TITLE, TOGGLE, VALUE, VIEW, VIEW_ID, WIDTH
Modifier | Constructor and Description |
---|---|
protected |
IlvDHTMLRenderer()
Creates a new
IlvDHTMLRenderer instance. |
Modifier and Type | Method and Description |
---|---|
void |
decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
The "Apply Request Values" phase of JSF life cycle implementation.
|
protected abstract void |
emitJSCreation(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Emits the JavaScript proxy declaration of the component that is rendered.
|
protected void |
emitJSSetProperties(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Emits the setting of the properties of the JavaScript object
representation.
|
protected void |
emitJSToHTML(javax.faces.context.ResponseWriter writer,
javax.faces.component.UIComponent component)
Emits the
toHTML method of the JavaScript representation of
the current component that is being rendered. |
protected void |
emitOnLoadHandler(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Emits the JavaScript handlers on the onload event of the page.
|
protected void |
emitResolvedDependencies(javax.faces.context.ResponseWriter writer,
javax.faces.component.UIComponent component)
Emits the JavaScript of the dependencies that have been resolved by the
creation of the component that is currently rendered.
|
protected void |
emitScriptsLoad(javax.faces.context.ResponseWriter writer)
Emits the scripts that are need to be loaded before the creation of the
JavaScript objects by the subclassed renderer.
|
protected void |
emitStateSavingHTMLObject(javax.faces.context.ResponseWriter writer,
javax.faces.component.UIComponent component)
Emits the hidden HTML object that will hold the state of the rendered
component.
|
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
This method is used in the "Render Response" phase of the JSF life cycle
implementation.
|
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
This method is used in the "Render Response" phase of the JSF life cycle
implementation.
|
protected HashMap<String,String> |
getParameterMap(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Returns the parameters extracted from the request for this component.
|
IlvScriptDescriptor |
getScriptDescriptor()
Returns the script descriptor of this renderer.
|
IlvScriptDescriptor |
getScriptDescriptor(javax.faces.component.UIComponent component)
Returns the script descriptor of this component.
|
HashMap<String,String> |
getTestParameterMap() |
protected void |
renderAttributesDT(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter out)
Renders the tag attributes of the component representation during the
design time.
|
protected void |
renderEndDT(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter out)
Renders the closing tag of the component representation during the design
time.
|
protected void |
renderStartDT(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter out)
Renders the opening tag of the component representation during design time.
|
protected abstract void |
resolveDependencies(javax.faces.component.UIComponent component,
IlvDependencyManager dependencyManager)
Resolves the dependencies needed by this component or register listeners
on the dependency manager if some dependencies cannot be resolved.
|
protected void |
resolveDependency(javax.faces.component.UIComponent component,
String property,
String id,
IlvDependencyManager dependencyManager)
Resolves a dependency from the component parameter to another designed by
the ID parameter.
|
protected void |
resolveDependency(javax.faces.component.UIComponent component,
String property,
String id,
IlvDependencyManager dependencyManager,
ComponentCreationListener listener)
Resolves a dependency from the component parameter to another designed by
the ID parameter.
|
protected void |
resolveVBDependency(javax.faces.component.UIComponent component,
String property,
String propertyId,
IlvDependencyManager dependencyManager)
Resolves a dependency on a component.
|
protected void |
resolveVBDependency(javax.faces.component.UIComponent component,
String property,
String propertyId,
IlvDependencyManager dependencyManager,
ComponentCreationListener listener)
Resolves a dependency on a component.
|
void |
setTestParameterMap(HashMap map) |
public static final IlvScriptDescriptor scriptDescriptor
protected IlvDHTMLRenderer()
IlvDHTMLRenderer
instance.public void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
decode
in class javax.faces.render.Renderer
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
UIComponent
to the output stream or writer
associated with the response we are creating. Note that it is used at design time
only.encodeBegin
in class javax.faces.render.Renderer
IOException
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
UIComponent
. This key method tries to resolve
the dependencies and prepare the component for the emit methods.encodeEnd
in class javax.faces.render.Renderer
IOException
protected void renderStartDT(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter out) throws IOException
encodeBegin
method if we are in
design time mode.context
- The current faces context.component
- The component processed by this renderer.out
- The response writer.IOException
protected void renderEndDT(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter out) throws IOException
encodeEnd
method if we
are in design time mode. It renders a simple representation of the
component using exclusively simple HTML elements.context
- The current faces context.component
- The component processed by this renderer.out
- The response writer.IOException
protected void renderAttributesDT(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter out) throws IOException
encodeBegin
method
if we are in design time mode.context
- The current faces context.component
- The component processed by this renderer.out
- The response writer.IOException
protected abstract void resolveDependencies(javax.faces.component.UIComponent component, IlvDependencyManager dependencyManager)
component
- The component processed by this renderer.dependencyManager
- The dependency manager.protected abstract void emitJSCreation(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component) throws IOException
toHTML
must NOT be generated here. The ID of
the JavaScript object must be the client ID of the component. It must be
called by the subclass.facesContext
- The current faces context.component
- The component processed by this renderer.IOException
protected void emitScriptsLoad(javax.faces.context.ResponseWriter writer) throws IOException
writer
- The response writer.IOException
protected void emitResolvedDependencies(javax.faces.context.ResponseWriter writer, javax.faces.component.UIComponent component) throws IOException
writer
- The response writer.component
- The component rendered.IOException
protected void emitStateSavingHTMLObject(javax.faces.context.ResponseWriter writer, javax.faces.component.UIComponent component) throws IOException
writer
- The response writer.component
- The component rendered.IOException
protected void emitJSToHTML(javax.faces.context.ResponseWriter writer, javax.faces.component.UIComponent component) throws IOException
toHTML
method of the JavaScript representation of
the current component that is being rendered.writer
- The current response writer.component
- The component processed by this renderer.IOException
protected void emitJSSetProperties(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component) throws IOException
facesContext
- The current faces context.component
- The component processed by this renderer.IOException
protected void emitOnLoadHandler(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component) throws IOException
facesContext
- The current faces context.component
- The component processed by this renderer.IOException
protected void resolveVBDependency(javax.faces.component.UIComponent component, String property, String propertyId, IlvDependencyManager dependencyManager, ComponentCreationListener listener)
component
- The component that needs a property to be resolved.property
- The property to be set if the dependency is resolved.propertyId
- The corresponding property identifier.dependencyManager
- The dependency manager.listener
- The listener to register if the dependency component is not
found.protected void resolveVBDependency(javax.faces.component.UIComponent component, String property, String propertyId, IlvDependencyManager dependencyManager)
component
- The component that needs a property to be resolved.property
- The property to be set if the dependency is resolved.propertyId
- The corresponding property identifier.dependencyManager
- The dependency manager.protected void resolveDependency(javax.faces.component.UIComponent component, String property, String id, IlvDependencyManager dependencyManager, ComponentCreationListener listener)
null
, do nothing. If the
dependency is resolved, the property parameter of the component is set to
the resolved component. If not, or if the dependency was not rendered already,
the listener is registered on the dependency manager.component
- The component that needs a property to be resolved.property
- The property to be set if the dependency is resolved.id
- The ID of the component to be resolved.dependencyManager
- The dependency manager.listener
- The listener to register if the dependency component is not
found.protected void resolveDependency(javax.faces.component.UIComponent component, String property, String id, IlvDependencyManager dependencyManager)
null
, do nothing. If the
dependency is resolved the property parameter of the component is set to
the resolved component. If not, a default
ComponentCreationListener
is registered on the dependency
manager.component
- The component that needs a property to be resolved.property
- The property to be set if the dependency is resolved.id
- The ID of the component to be resolved.dependencyManager
- The dependency manager.protected HashMap<String,String> getParameterMap(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
context
- The current faces context.component
- The component decoded by this renderer.public HashMap<String,String> getTestParameterMap()
public void setTestParameterMap(HashMap map)
public IlvScriptDescriptor getScriptDescriptor()
public IlvScriptDescriptor getScriptDescriptor(javax.faces.component.UIComponent component)
component
- The component to render© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.