org.alfresco.web.bean.generator
Class HtmlSeparatorGenerator

java.lang.Object
  extended by org.alfresco.web.bean.generator.BaseComponentGenerator
      extended by org.alfresco.web.bean.generator.HtmlSeparatorGenerator
All Implemented Interfaces:
IComponentGenerator
Direct Known Subclasses:
LabelSeparatorGenerator, SeparatorGenerator

public class HtmlSeparatorGenerator
extends BaseComponentGenerator

Generates a component to represent a separator.

The HTML to be used for the separator is configured via the setHtml method.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.alfresco.web.bean.generator.BaseComponentGenerator
BaseComponentGenerator.ControlType
 
Field Summary
protected  java.lang.String html
           
 
Constructor Summary
HtmlSeparatorGenerator()
           
 
Method Summary
protected  javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context, UIPropertySheet propertySheet, PropertySheetItem item)
          Creates the component for the given proerty sheet item.
 javax.faces.component.UIComponent generate(javax.faces.context.FacesContext context, java.lang.String id)
          Dynamically generates a component in a default state
 java.lang.String getHtml()
          Returns the HTML configured to be used for this separator
protected  java.lang.String getResolvedHtml(javax.faces.component.UIComponent component, PropertySheetItem item)
          Returns the resolved HTML to use for the separator.
 void setHtml(java.lang.String html)
          Sets the HTML to display for the separator
 
Methods inherited from class org.alfresco.web.bean.generator.BaseComponentGenerator
addStringConstraintParam, createAndSetConverter, createOutputTextComponent, generateAndAdd, getAssociationDefinition, getControlType, getPropertyDefinition, isEnabledInEditMode, setupAssociation, setupConstraints, setupConverter, setupConverter, setupMandatoryAssociationIfNecessary, setupMandatoryMarker, setupMandatoryPropertyIfNecessary, setupMandatoryValidation, setupMultiValuePropertyIfNecessary, setupNumericRangeConstraint, setupProperty, setupRegexConstraint, setupStringLengthConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

html

protected java.lang.String html
Constructor Detail

HtmlSeparatorGenerator

public HtmlSeparatorGenerator()
Method Detail

getHtml

public java.lang.String getHtml()
Returns the HTML configured to be used for this separator

Returns:
The HTML to display

setHtml

public void setHtml(java.lang.String html)
Sets the HTML to display for the separator

Parameters:
html - The HTML

generate

public javax.faces.component.UIComponent generate(javax.faces.context.FacesContext context,
                                                  java.lang.String id)
Description copied from interface: IComponentGenerator
Dynamically generates a component in a default state

Parameters:
context - FacesContext
id - Optional id for the newly created component, if null is passed a unique id is generated
Returns:
The component instance

createComponent

protected javax.faces.component.UIComponent createComponent(javax.faces.context.FacesContext context,
                                                            UIPropertySheet propertySheet,
                                                            PropertySheetItem item)
Description copied from class: BaseComponentGenerator
Creates the component for the given proerty sheet item.

Overrides:
createComponent in class BaseComponentGenerator
Parameters:
context - FacesContext
propertySheet - The property sheet being generated
item - The property or association being generated
Returns:
The newly created component

getResolvedHtml

protected java.lang.String getResolvedHtml(javax.faces.component.UIComponent component,
                                           PropertySheetItem item)
Returns the resolved HTML to use for the separator.

In the default case we just return the HTML set via setHtml however subclasses may choose to generate the resulting HTML using a combination of the HTML set via setHtml and the given PropertySheetItem.

Parameters:
component - The JSF component representing the separator
item - The separator item
Returns:
The resolved HTML


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.