|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ivata.mask.web.tag.html.MaskProperties
This is the implementation of routines shared across the Struts override tags. It originally appeared in ivata op .
One of the functions of these properties is to automate message resource paths. If a label key, or a title is not specified for a tag, it is defaulted by searching for the key in the bundle specified and, if it is not found there, in the main bundle.
This docu is not complete. For an example of the paths and how they work,
please refer to the ApplicationResources file in the
ivata masks demo.
TODO: explain fully the path defaulting here...
| Constructor Summary | |
MaskProperties()
|
|
| Method Summary | |
java.lang.String |
getBundle()
Set the bundle for this mask tag. |
java.lang.String |
getClassName()
In a label tag, you can specify a class for which to display the correct label. |
java.lang.String |
getFieldName()
The field name is used to default the following attributes of the tag: styleId
titleKey
valueKey
. |
java.util.List |
getLabelArgs()
Contains any arguments to the label key. |
java.lang.String |
getLabelKey()
Localization key of a string which will appear as a label, for example to the right of a check box. |
java.lang.String |
getLabelKeySuffix()
Some fields have multiple label keys. |
java.lang.String |
getLocale()
String representation of the current locale. |
boolean |
getMandatory()
Get whether or not the value this control must be entered. |
javax.servlet.jsp.PageContext |
getPageContext()
Current JSP page context. |
FormTag |
getParentForm()
Stores a reference to the FormTag which surrounds this
mask tagf. |
boolean |
getReadOnly()
Specifies whether or not the input values can be altered. |
java.lang.String |
getTitle()
Get the value of the title for this tag. |
java.util.List |
getTitleArgs()
Contains any arguments to the title key. |
java.lang.String |
getTitleKey()
Stores the value of the key used to localize the title tag attribute. |
java.lang.String |
getValue()
Get the localized value text from the value key and arguments. |
java.util.List |
getValueArgs()
Contains any arguments to the value key. |
java.lang.String |
getValueKey()
Stores the value of the key used to localize the value tag attribute. |
void |
modifyIfMandatory(org.apache.struts.taglib.html.BaseHandlerTag control)
Modified the Struts control provided on the basis of whether or not it is mandatory. |
void |
reset(org.apache.struts.taglib.html.BaseHandlerTag maskTag)
Reset the attributes and mask properties of the supplied tag. |
void |
setBundle(java.lang.String bundleParam)
Refer to getBundle(). |
void |
setClassName(java.lang.String classNameParam)
Refer to getClassName(). |
void |
setFieldName(java.lang.String fieldNameParam)
The field name is used to default the following attributes of the tag: styleId
titleKey
valueKey
. |
void |
setLabelArgs(java.util.List args)
Set the arguments for the label message, as an array of strings. |
void |
setLabelKey(java.lang.String labelKeyParam)
Localization key of a string which will appear as a label, for example to the right of a check box. |
void |
setLabelKeySuffix(java.lang.String labelKeySuffixParam)
Some fields have multiple label keys. |
void |
setLocale(java.lang.String localeParam)
String representation of the current locale. |
void |
setMandatory(boolean mandatoryParam)
Set whether or not the value this control must be entered. |
void |
setPageContext(javax.servlet.jsp.PageContext pageContextParam)
Current JSP page context. |
void |
setParentForm(FormTag parentFormParam)
Stores a reference to the FormTag which surrounds this
mask tagf. |
void |
setReadOnly(boolean readOnlyParam)
Specifies whether or not the input values can be altered. |
void |
setTitleArgs(java.util.List args)
Set the arguments for the title message. |
void |
setTitleKey(java.lang.String titleKeyParam)
Stores the value of the key used to localize the title tag attribute. |
void |
setValueArgs(java.util.List valueArgsParam)
Contains any arguments to the value key. |
void |
setValueKey(java.lang.String valueKeyParam)
Stores the value of the key used to localize the value tag attribute. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MaskProperties()
| Method Detail |
public final java.lang.String getBundle()
Set the bundle for this mask tag. The bundle is used to identify the set of message resources used to localize texts. See the Struts docu for more information.
public java.lang.String getClassName()
In a label tag, you can specify a class for which to display the correct label.
public java.lang.String getFieldName()
The field name is used to default the following attributes of the tag:
styleIdtitleKeyvalueKey
The valueKey and titleKey are obtained
by prefixing the value of resourceFieldPath from the
surrounding
form.
public java.util.List getLabelArgs()
Contains any arguments to the label key.
public java.lang.String getLabelKey()
Localization key of a string which will appear as a label, for example to the right of a check box.
public java.lang.String getLabelKeySuffix()
Some fields have multiple label keys. This suffix is appended to the key when retrieving the localized text from the application resources file.
public java.lang.String getLocale()
String representation of the current locale. Taken from the session in
doStartTag.
public boolean getMandatory()
Get whether or not the value this control must be entered.
true if this field must be entered, otherwise
false if the field is optional.public javax.servlet.jsp.PageContext getPageContext()
Current JSP page context. Set in doStartTag.
public FormTag getParentForm()
Stores a reference to the FormTag which surrounds this
mask tagf.
public boolean getReadOnly()
Specifies whether or not the input values can be altered.
The handling here has been extended to take into account the state of the
parent form. If the read only state of this tag has not been set
explicitly (by setReadOnly(boolean readOnly), then we get the
read only state of the parent formtag and return that.
true if the input of this field can be changed,
otherwise false to only display the current value.
public java.lang.String getTitle()
throws javax.servlet.jsp.JspException
Get the value of the title for this tag.
javax.servlet.jsp.JspException - thrown by getMessage.public java.util.List getTitleArgs()
Contains any arguments to the title key.
public java.lang.String getTitleKey()
Stores the value of the key used to localize the title tag attribute.
public java.lang.String getValue()
throws javax.servlet.jsp.JspException
Get the localized value text from the value key and arguments.
valueKey.
javax.servlet.jsp.JspException - thrown by getMessage.public java.util.List getValueArgs()
Contains any arguments to the value key.
public java.lang.String getValueKey()
Stores the value of the key used to localize the value tag attribute.
public void modifyIfMandatory(org.apache.struts.taglib.html.BaseHandlerTag control)
Modified the Struts control provided on the basis of whether or not it is mandatory.
control - Struts tag instance to be modified on the
basis of whether or not it is mandatory.
public void reset(org.apache.struts.taglib.html.BaseHandlerTag maskTag)
throws javax.servlet.jsp.JspException
Reset the attributes and mask properties of the supplied tag. This method should be called after all processing on the tag, as the tag instances are re-used by the servlet engine. Calling this method ensures no two tags sharing the same instance receive the same attributes.
maskTag - the tag whose properties should be reset.
javax.servlet.jsp.JspException - if there is an error accessing methods to reset,
using PropertyUtils.setSimpleProperty.public void setBundle(java.lang.String bundleParam)
getBundle().
bundleParam - Refer to getBundle().public void setClassName(java.lang.String classNameParam)
getClassName().
classNameParam - Refer to getClassName().public void setFieldName(java.lang.String fieldNameParam)
The field name is used to default the following attributes of the tag:
styleIdtitleKeyvalueKey
The valueKey and titleKey are obtained
by prefixing the value of resourceFieldPath from the
surrounding
form.
fieldNameParam - the new value of fieldName.public void setLabelArgs(java.util.List args)
args - new value of the message argument.public final void setLabelKey(java.lang.String labelKeyParam)
Localization key of a string which will appear as a label, for example to the right of a check box.
labelKeyParam - the new value of labelKey.public final void setLabelKeySuffix(java.lang.String labelKeySuffixParam)
Some fields have multiple label keys. This suffix is appended to the key when retrieving the localized text from the application resources file.
labelKeySuffixParam - the new value of labelKeySuffix.public void setLocale(java.lang.String localeParam)
String representation of the current locale. Taken from the session in
doStartTag.
localeParam - the new value of locale.public void setMandatory(boolean mandatoryParam)
Set whether or not the value this control must be entered.
mandatoryParam - true if this field must be entered, otherwise
false if the field is optional.public void setPageContext(javax.servlet.jsp.PageContext pageContextParam)
Current JSP page context. Set in doStartTag.
pageContextParam - the new value of pageContext.public void setParentForm(FormTag parentFormParam)
Stores a reference to the FormTag which surrounds this
mask tagf.
parentFormParam - the new value of parentForm.public void setReadOnly(boolean readOnlyParam)
Specifies whether or not the input values can be altered.
readOnlyParam - true if the input of this field can be changed,
otherwise false to only display the current
value.public final void setTitleArgs(java.util.List args)
args - new value of the title arguments.public final void setTitleKey(java.lang.String titleKeyParam)
Stores the value of the key used to localize the title tag attribute.
titleKeyParam - the new value of titleKey.public final void setValueArgs(java.util.List valueArgsParam)
Contains any arguments to the value key.
valueArgsParam - the new value of valueArgs.public void setValueKey(java.lang.String valueKeyParam)
Stores the value of the key used to localize the value tag attribute.
valueKeyParam - the new value of valueKey.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||