|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.formview.FormViewResources
public class FormViewResources
Description : Form view Resources wich load file form-view.xml and merge field with validator (validation.xml)
Field Summary | |
---|---|
protected java.util.Map |
contextValuesMap
Map of context values with
the name of the constant as the key. |
protected org.apache.commons.collections.FastHashMap |
hDisplayers
FastHashMap of displayers with
the name of the constant as the key. |
protected org.apache.commons.collections.FastHashMap |
hHTMLDisplayers
|
protected org.apache.commons.collections.FastHashMap |
hRolesDefinition
FastHashMap of role definition with
the name of the constant as the key. |
protected org.apache.commons.collections.FastHashMap |
hStates
FastHashMap of global constant values with
the name of the constant as the key. |
protected java.util.List |
lHTMLDisplayers
|
protected static org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
FormViewResources(java.io.InputStream in)
Create a FormViewResources object from an InputStream. |
|
FormViewResources(java.io.InputStream[] streams)
Create a FormViewResources object from an InputStream. |
Method Summary | |
---|---|
void |
addContextValue(java.lang.String key,
java.lang.String value)
|
void |
addDisplayer(Displayer displayer)
|
void |
addDisplayer(java.lang.String name,
java.lang.String className)
Add a displayer to the resource. |
void |
addDisplayerClass(IHTMLDisplayer htmlDisplayer)
|
void |
addForm(FormView formView)
Add a FormSet to this FormViewResources
object. |
void |
addRoleDefinition(RoleDefinition roleDefinition)
|
void |
addRoleDefinition(java.lang.String name,
RoleDefinition roleDefinition)
Add a role definition to the resource. |
void |
addState(State state)
|
void |
addState(java.lang.String name,
java.lang.String behaviour)
Add a global state to the resource. |
java.util.Map |
getContextValuesMap(FieldView field)
|
java.lang.String |
getDefaultBehaviour(java.lang.String defaultState)
|
java.lang.String |
getErrorBehaviour()
|
FormView |
getForm(java.lang.String formKey,
java.lang.String state)
|
FormSetView |
getFormSet()
|
FormView |
getFormView(java.lang.String formName,
java.lang.String state)
|
FormView |
getFormView(java.lang.String formName,
java.lang.String state,
java.util.Map roles)
|
FormView |
getFormView(java.lang.String formName,
java.lang.String state,
java.lang.String[] roles)
|
void |
mergeDisplayersWithDisplayerConfig(DisplayersConfigResources displayersResources)
|
void |
mergeFormSetWithValidator(ExtendedValidatorResources validatorResources)
|
java.lang.String |
processHtmlContent(FormView form,
java.lang.String state,
IPermissionsAdapter permissionsAdapter,
java.lang.String htmlContent)
|
void |
setErrorBehaviour(java.lang.String errorBehaviour)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected org.apache.commons.collections.FastHashMap hStates
FastHashMap
of global constant values with
the name of the constant as the key.
protected org.apache.commons.collections.FastHashMap hRolesDefinition
FastHashMap
of role definition with
the name of the constant as the key.
protected org.apache.commons.collections.FastHashMap hDisplayers
FastHashMap
of displayers with
the name of the constant as the key.
protected org.apache.commons.collections.FastHashMap hHTMLDisplayers
protected java.util.List lHTMLDisplayers
protected java.util.Map contextValuesMap
Map
of context values with
the name of the constant as the key.
In this Map user can put name with value
and use this value into your DisplayerConfig (eg :
put context of WEB Application with key contextPath
=> and after
you can use value into displayers like this
Constructor Detail |
---|
public FormViewResources(java.io.InputStream in) throws java.io.IOException, org.xml.sax.SAXException
in
- InputStream to a formview-config.xml configuration file.
It's the client's
responsibility to close this stream.
java.io.IOException
org.xml.sax.SAXException
- if the formview-config. XML files are not valid or well
formed.public FormViewResources(java.io.InputStream[] streams) throws java.io.IOException, org.xml.sax.SAXException
streams
- An array of InputStreams to several formview-config.xml
configuration files that will be read in order and merged into this object.
It's the client's responsibility to close these streams.
java.io.IOException
org.xml.sax.SAXException
- if the formview-config XML files are not valid or well
formed.Method Detail |
---|
public void mergeFormSetWithValidator(ExtendedValidatorResources validatorResources)
public void addContextValue(java.lang.String key, java.lang.String value)
public void addState(State state)
public void addState(java.lang.String name, java.lang.String behaviour)
public void addRoleDefinition(RoleDefinition roleDefinition)
public void addRoleDefinition(java.lang.String name, RoleDefinition roleDefinition)
public void addDisplayer(Displayer displayer)
public void addDisplayer(java.lang.String name, java.lang.String className)
public void mergeDisplayersWithDisplayerConfig(DisplayersConfigResources displayersResources)
public void addDisplayerClass(IHTMLDisplayer htmlDisplayer)
public void addForm(FormView formView)
FormSet
to this FormViewResources
object.
public FormSetView getFormSet()
public FormView getForm(java.lang.String formKey, java.lang.String state)
public java.lang.String getDefaultBehaviour(java.lang.String defaultState)
public FormView getFormView(java.lang.String formName, java.lang.String state)
public FormView getFormView(java.lang.String formName, java.lang.String state, java.lang.String[] roles)
public FormView getFormView(java.lang.String formName, java.lang.String state, java.util.Map roles)
public java.lang.String processHtmlContent(FormView form, java.lang.String state, IPermissionsAdapter permissionsAdapter, java.lang.String htmlContent)
public java.util.Map getContextValuesMap(FieldView field)
public java.lang.String getErrorBehaviour()
public void setErrorBehaviour(java.lang.String errorBehaviour)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |