|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.frontend.templateone.form.A_CmsField
public abstract class A_CmsField
Abstract base class for all input fields.
| Constructor Summary | |
|---|---|
A_CmsField()
Default constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getErrorMessage()
Returns a optional, custom error message to be displayed instead of the standard validation error message. |
java.util.List |
getItems()
Returns the list of items for select boxes, radio buttons and checkboxes. |
java.lang.String |
getLabel()
Returns the description text of the input field. |
java.lang.String |
getName()
Returns the name of the input field. |
int |
getPlaceholder()
Returns the placeholder. |
int |
getPosition()
Returns the position. |
java.lang.String |
getValidationExpression()
Returns the regular expression that is used for validation of the field. |
java.lang.String |
getValue()
Returns the initial value of the field. |
protected void |
incrementPlaceholder(java.lang.String message)
This function sets the cells of placeholder. |
boolean |
isMandatory()
Returns if this input field is mandatory. |
boolean |
needsItems()
Checks if an item list is needed for this field. |
protected void |
setErrorMessage(java.lang.String errorMessage)
Sets the error message if validation failed. |
protected void |
setItems(java.util.List items)
Sets the list of items for select boxes, radio buttons and checkboxes. |
protected void |
setLabel(java.lang.String description)
Sets the description text of the input field. |
protected void |
setMandatory(boolean mandatory)
Sets if this input field is mandatory. |
protected void |
setName(java.lang.String name)
Sets the name of the input field. |
void |
setPlaceholder(int placeholder)
Sets the placeholder. |
void |
setPosition(int position)
Sets the position. |
protected void |
setValidationExpression(java.lang.String expression)
Sets the regular expression that is used for validation of the field. |
protected void |
setValue(java.lang.String value)
Sets the initial value of the field. |
protected boolean |
showRowEnd(java.lang.String colSizeTwo)
This functions looks if the row should be end. |
protected boolean |
showRowStart(java.lang.String colSizeTwo)
This functions looks if the row should be start. |
java.lang.String |
toString()
Returns the field value as a String. |
java.lang.String |
validate(CmsFormHandler formHandler)
Validates this field by validating it's constraints and input value. |
protected java.lang.String |
validateConstraints()
Validates the constraints if this field is mandatory. |
protected java.lang.String |
validateValue()
Validates the input value of this field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opencms.frontend.templateone.form.I_CmsField |
|---|
buildHtml, getType |
| Constructor Detail |
|---|
public A_CmsField()
| Method Detail |
|---|
public java.lang.String getErrorMessage()
I_CmsField
getErrorMessage in interface I_CmsFieldI_CmsField.getErrorMessage()public java.util.List getItems()
I_CmsFieldThe list contains CmsFieldItem objects with the following information:
getItems in interface I_CmsFieldI_CmsField.getItems()public java.lang.String getLabel()
I_CmsField
getLabel in interface I_CmsFieldI_CmsField.getLabel()public java.lang.String getName()
I_CmsField
getName in interface I_CmsFieldI_CmsField.getName()public int getPlaceholder()
getPlaceholder in interface I_CmsFieldpublic int getPosition()
getPosition in interface I_CmsFieldpublic java.lang.String getValidationExpression()
I_CmsField
getValidationExpression in interface I_CmsFieldI_CmsField.getValidationExpression()public java.lang.String getValue()
I_CmsField
getValue in interface I_CmsFieldI_CmsField.getValue()public boolean isMandatory()
I_CmsField
isMandatory in interface I_CmsFieldI_CmsField.isMandatory()public boolean needsItems()
I_CmsField
needsItems in interface I_CmsFieldI_CmsField.needsItems()public void setPlaceholder(int placeholder)
setPlaceholder in interface I_CmsFieldplaceholder - the placeholder to setpublic void setPosition(int position)
setPosition in interface I_CmsFieldposition - the position to setpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.String validate(CmsFormHandler formHandler)
I_CmsField
validate in interface I_CmsFieldformHandler - the handler of the current form
CmsFormHandler.ERROR_VALIDATION if validation of the input value failed, CmsFormHandler.ERROR_VALIDATION if validation of the input value failedI_CmsField.validate(CmsFormHandler)protected void incrementPlaceholder(java.lang.String message)
message - integer value of adding to the placeholder valueprotected void setErrorMessage(java.lang.String errorMessage)
errorMessage - the error message if validation failedprotected void setItems(java.util.List items)
The list contains CmsFieldItem objects with the following information:
items - the list of items for select boxes, radio buttons and checkboxesprotected void setLabel(java.lang.String description)
description - the description text of the input fieldprotected void setMandatory(boolean mandatory)
mandatory - true if this input field is mandatory, otherwise falseprotected void setName(java.lang.String name)
name - the name of the input fieldprotected void setValidationExpression(java.lang.String expression)
expression - the regular expression that is used for validation of the fieldprotected void setValue(java.lang.String value)
value - the initial value of the fieldprotected boolean showRowEnd(java.lang.String colSizeTwo)
colSizeTwo - if two cols should be shown
protected boolean showRowStart(java.lang.String colSizeTwo)
colSizeTwo - if two cols should be shown
protected java.lang.String validateConstraints()
CmsFormHandler.ERROR_MANDATORY if a constraint is violatedprotected java.lang.String validateValue()
CmsFormHandler.ERROR_VALIDATION if validation of the input value failed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||