| java.lang.Object org.opencms.workplace.CmsWidgetDialogParameter
CmsWidgetDialogParameter | public class CmsWidgetDialogParameter implements I_CmsWidgetParameter(Code) | | Implements the widget parameter interface for the use of OpenCms widgets on dialogs that
are not based on XML contents.
author: Alexander Kandzior version: $Revision: 1.16 $ since: 6.0.0 |
Constructor Summary | |
public | CmsWidgetDialogParameter(CmsWidgetDialogParameter base, int index) | public | CmsWidgetDialogParameter(CmsWidgetDialogParameter base, int index, int originalIndex) | public | CmsWidgetDialogParameter(Object base, String property, I_CmsWidget widget) | public | CmsWidgetDialogParameter(Object base, String property, String dialogPage, I_CmsWidget widget) | public | CmsWidgetDialogParameter(Object base, String property, String htmlName, String dialogPage, I_CmsWidget widget) | public | CmsWidgetDialogParameter(Object base, String property, String defaultValue, String dialogPage, I_CmsWidget widget, int minOccurs, int maxOccurs) | public | CmsWidgetDialogParameter(Object base, String property, String htmlName, String defaultValue, String dialogPage, I_CmsWidget widget, int minOccurs, int maxOccurs) | public | CmsWidgetDialogParameter(String name, I_CmsWidget widget) | public | CmsWidgetDialogParameter(String name, I_CmsWidget widget, int minOccurs, int maxOccurs) | public | CmsWidgetDialogParameter(String value, String defaultValue, String name, I_CmsWidget widget, String dialog, int minOccurs, int maxOccurs, int index) |
DEFAULT_DIALOG_PAGE | final public static String DEFAULT_DIALOG_PAGE(Code) | | The name of the default dialog page.
|
MAX_OCCURENCES | final public static int MAX_OCCURENCES(Code) | | The maximum number of occurences of a widget dialog element in a list of elements.
|
m_baseCollection | protected Object m_baseCollection(Code) | | The (optional) base collection for read / writing collection based parameters.
|
m_baseObject | protected Object m_baseObject(Code) | | The (optional) base object for read / writing the parameter value to.
|
m_baseObjectProperty | protected String m_baseObjectProperty(Code) | | The (optinal) object property to read / write this parameter value to.
|
m_defaultValue | protected String m_defaultValue(Code) | | The default value of the parameter.
|
m_dialogPage | protected String m_dialogPage(Code) | | The name of the dialog (page) the widget is used on.
|
m_error | protected Throwable m_error(Code) | | Indicates if the widget value has an error.
|
m_id | protected String m_id(Code) | | The id of the parameter on the form.
|
m_index | protected int m_index(Code) | | The index of this parameter in the (optional) list of parameters.
|
m_maxOccurs | protected int m_maxOccurs(Code) | | The maximum number of occurences of this parameter.
|
m_minOccurs | protected int m_minOccurs(Code) | | The minimum number of occurences of this parameter.
|
m_name | protected String m_name(Code) | | The name of the parameter.
|
m_prefix | protected String m_prefix(Code) | | Optional localized key prefix identificator.
|
m_value | protected String m_value(Code) | | The value of the parameter.
|
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(CmsWidgetDialogParameter base, int index)(Code) | | Create a new Widget parameter.
Parameters: base - the base of the parameter Parameters: index - the index of this parameter in the list |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(CmsWidgetDialogParameter base, int index, int originalIndex)(Code) | | Create a new Widget parameter.
Parameters: base - the base of the parameter Parameters: index - the index of this parameter in the list Parameters: originalIndex - the original index in the previous version of the list |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(Object base, String property, I_CmsWidget widget)(Code) | | Create a new Widget parameter based on a given object's property.
Parameters: base - the base object to map the parameter to / from Parameters: property - the base object property to map the parameter to / from Parameters: widget - the widget used for this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(Object base, String property, String dialogPage, I_CmsWidget widget)(Code) | | Create a new Widget parameter based on a given object's property.
Parameters: base - the base object to map the parameter to / from Parameters: property - the base object property to map the parameter to / from Parameters: dialogPage - the dialog page to use the widget on Parameters: widget - the widget used for this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(Object base, String property, String htmlName, String dialogPage, I_CmsWidget widget)(Code) | | Create a new Widget parameter based on a given object's property.
Parameters: base - the base object to map the parameter to / from Parameters: property - the base object property to map the parameter to / from Parameters: htmlName - the form id name to use in the generated HTML Parameters: dialogPage - the dialog page to use the widget on Parameters: widget - the widget used for this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(Object base, String property, String defaultValue, String dialogPage, I_CmsWidget widget, int minOccurs, int maxOccurs)(Code) | | Create a new Widget parameter based on a given object's property.
Parameters: base - the base object to map the parameter to / from Parameters: property - the base object property to map the parameter to / from Parameters: defaultValue - the default value to use for this parameter Parameters: dialogPage - the dialog page to use the widget on Parameters: widget - the widget used for this paramete Parameters: minOccurs - the required minimum numer of occurences of this parameter Parameters: maxOccurs - the maximum allowed numer of occurences of this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(Object base, String property, String htmlName, String defaultValue, String dialogPage, I_CmsWidget widget, int minOccurs, int maxOccurs)(Code) | | Create a new Widget parameter based on a given object's property.
Parameters: base - the base object to map the parameter to / from Parameters: property - the base object property to map the parameter to / from Parameters: htmlName - the form id name to use in the generated HTML Parameters: defaultValue - the default value to use for this parameter Parameters: dialogPage - the dialog page to use the widget on Parameters: widget - the widget used for this paramete Parameters: minOccurs - the required minimum numer of occurences of this parameter Parameters: maxOccurs - the maximum allowed numer of occurences of this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(String name, I_CmsWidget widget)(Code) | | Create a new Widget parameter.
Parameters: name - the name of the parameter Parameters: widget - the widget used for this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(String name, I_CmsWidget widget, int minOccurs, int maxOccurs)(Code) | | Create a new Widget parameter.
Parameters: name - the name of the parameter Parameters: widget - the widget used for this parameter Parameters: minOccurs - the required minimum numer of occurences of this parameter Parameters: maxOccurs - the maximum allowed numer of occurences of this parameter |
CmsWidgetDialogParameter | public CmsWidgetDialogParameter(String value, String defaultValue, String name, I_CmsWidget widget, String dialog, int minOccurs, int maxOccurs, int index)(Code) | | Create a new Widget parameter with specified occurence settings.
Parameters: value - the initial value of the parameter Parameters: defaultValue - the default value of the parameter Parameters: name - the id of the parameter Parameters: widget - the widget used for this parameter Parameters: dialog - the dialog this parameter is used on Parameters: minOccurs - the required minimum numer of occurences of this parameter Parameters: maxOccurs - the maximum allowed numer of occurences of this parameter Parameters: index - the index of this parameter in the list |
commitValue | public void commitValue(CmsWidgetDialog dialog) throws CmsException(Code) | | "Commits" (writes) the value of this widget back to the underlying base object.
Parameters: dialog - the widget dialog where the parameter is used on throws: CmsException - in case the String value of the widget is invalid for the base Object |
createId | public static String createId(String name, int index)(Code) | | Returns a from id representation for the given widget name and id.
Parameters: name - the widget parameter name Parameters: index - the widget parameter index a from id representation for the given widget name and id |
getDialogPage | public String getDialogPage()(Code) | | Returns the name of the dialog (or dialog page) this widget parameter is used on.
This information can be used to create multi-page dialogs where the
widgets are spread over several pages.
the name of the dialog (or dialog page) this widget parameter is used on |
getError | public Throwable getError()(Code) | | Returns the Exception caused when this parameter value was commited, or null
if error occured.
the Exception caused when this parameter value was commited |
getWidget | public I_CmsWidget getWidget()(Code) | | Returns the widget for this parameter.
the widget for this parameter |
hasValue | public boolean hasValue(int index)(Code) | | Checks if a value for this widget base type with the given id is available.
This should only be used if the base object is a collection.
Parameters: index - the index to check true if a value for this widget base type with the given id is available |
init | protected void init(String value, String defaultValue, String name, I_CmsWidget widget, String dialog, int minOccurs, int maxOccurs, int index)(Code) | | Initializes a widget parameter with the given values.
Parameters: value - the initial value of the parameter Parameters: defaultValue - the default value of the parameter Parameters: name - the id of the parameter Parameters: widget - the widget used for this parameter Parameters: dialog - the dialog this parameter is used on Parameters: minOccurs - the required minimum numer of occurences of this parameter Parameters: maxOccurs - the maximum allowed numer of occurences of this parameter Parameters: index - the index of this parameter in the list |
isCollectionBase | public boolean isCollectionBase()(Code) | | Returns true if this widget parameter is mapped to a Collection base object.
true if this widget parameter is mapped to a Collection base object |
prepareCommit | public void prepareCommit()(Code) | | Prepares this widget dialog parameter to be commited.
This is required if the base type is mapped to a Collection object,
becasue the collection needs to be cleared before the new values are set.
|
setError | public void setError(Throwable error)(Code) | | Sets the error state of this widget.
If the argument is null then the state is set to "no error".
Parameters: error - the error state to set |
setindex | public void setindex(int index)(Code) | | Sets the index to the provided value.
Parameters: index - the new index value to set |
|
|