net.sourceforge.formview.displayer
Class DisplayerConfig

java.lang.Object
  extended by net.sourceforge.formview.displayer.DisplayerConfig
All Implemented Interfaces:
IHTMLDisplayer

public class DisplayerConfig
extends java.lang.Object
implements IHTMLDisplayer

Description : Displayers Config.

Version:
1.0.0
Author:
Angelo ZERR

Field Summary
protected  org.apache.commons.collections.FastHashMap hBehaviours
          FastHashMap of Behaviours stored under a name key.
protected  org.apache.commons.collections.FastHashMap hProperties
          FastHashMap of Propertis stored under a name key.
protected  java.util.ArrayList lBehaviours
          List of Behaviours.
protected static org.apache.commons.logging.Log log
           
protected  java.util.ArrayList lProperties
          List of Propertys.
 
Constructor Summary
DisplayerConfig()
           
 
Method Summary
 void addBehaviour(Behaviour behaviour)
           
 void addBehaviour(java.lang.String name, Behaviour behaviour)
           
 void addProperty(Property property)
           
 void addProperty(java.lang.String name, Property property)
           
 java.lang.String getAttributesName()
          Return attribute names to parse for a displayer.
 java.lang.String getName()
          Return name of displayer for specific HTML element Name of displayer must be the same name of HTML element.
 void processHTML(FieldView field, java.lang.String defaultBehaviour, java.util.Map contextValuesMap, au.id.jericho.lib.html.Element htmlElement, au.id.jericho.lib.html.OutputDocument htmlOutputDocument)
          Transform current HTML element by adding (before, after HTML element) another HTML content, by adding HTML attribute to HTML element or by replacing HTML element by another HTML content.
 void setAttributesName(java.lang.String attributesName)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

hProperties

protected org.apache.commons.collections.FastHashMap hProperties
FastHashMap of Propertis stored under a name key.


lProperties

protected java.util.ArrayList lProperties
List of Propertys. Used to maintain the order they were added in although individual Propertys can be retrieved using Map of Propertys.


hBehaviours

protected org.apache.commons.collections.FastHashMap hBehaviours
FastHashMap of Behaviours stored under a name key.


lBehaviours

protected java.util.ArrayList lBehaviours
List of Behaviours. Used to maintain the order they were added in although individual Behaviours can be retrieved using Map of Behaviours.

Constructor Detail

DisplayerConfig

public DisplayerConfig()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IHTMLDisplayer
Return name of displayer for specific HTML element Name of displayer must be the same name of HTML element. (eg : return select if you want implement displayer for HTML select element. Use character _ if you want filter about element type HTML. (eg : return input_text for displayer input type="text")

Specified by:
getName in interface IHTMLDisplayer
Returns:
name of displayer

setName

public void setName(java.lang.String name)

getAttributesName

public java.lang.String getAttributesName()
Description copied from interface: IHTMLDisplayer
Return attribute names to parse for a displayer. Eg : name,id

Specified by:
getAttributesName in interface IHTMLDisplayer
Returns:

setAttributesName

public void setAttributesName(java.lang.String attributesName)

addProperty

public void addProperty(Property property)

addProperty

public void addProperty(java.lang.String name,
                        Property property)

addBehaviour

public void addBehaviour(Behaviour behaviour)

addBehaviour

public void addBehaviour(java.lang.String name,
                         Behaviour behaviour)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

processHTML

public void processHTML(FieldView field,
                        java.lang.String defaultBehaviour,
                        java.util.Map contextValuesMap,
                        au.id.jericho.lib.html.Element htmlElement,
                        au.id.jericho.lib.html.OutputDocument htmlOutputDocument)
Description copied from interface: IHTMLDisplayer
Transform current HTML element by adding (before, after HTML element) another HTML content, by adding HTML attribute to HTML element or by replacing HTML element by another HTML content.

Specified by:
processHTML in interface IHTMLDisplayer
Parameters:
field - characteristics (MAXLENGTH, REQUIRED, DATE). ATTENTION !!! this parameter can be null, when field are not defined into XML config form-view.xml.
defaultBehaviour - global behaviour of your form.
contextValuesMap - Map which contains keys/values context, which can be use to generate HTML (eg: key=${maxlength} value=50, you can use into HTML String and replace key by value to generate .
htmlElement - HTML (in) element
htmlOutputDocument - HTML output document which contains the whole HTML content after trenasformation.


Copyright 2006 null. All Rights Reserved.