|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colle.forms.Text
This class is the text element within a form structure. Created: 10 Jul 2001
Field Summary | |
static String |
ERROR_TOO_LONG
|
static String |
ERROR_TOO_SHORT
|
Fields inherited from interface net.sf.colle.forms.FormElement |
ERROR_INVALID, ERROR_REQUIRED, UNKNOWN, VALID |
Constructor Summary | |
Text(String psName,
Object pxApplicationElement,
FormElement pxParent,
String psDefaultValue,
boolean pbRequired,
int pnMinLength,
int pnMaxLength)
Create a new text element. |
Method Summary | |
Object |
getApplicationElement()
Returns the application object that corresponds to this form object. |
protected String |
getDerivedType()
Allows derived classes to define the type placed to the out-going XML response document. |
String |
getErrorCode()
Returns the error code of the element |
String |
getName()
Returns the name of the the form element. |
String |
getPath()
Returns the path to the form element. |
boolean |
getRequired()
Returns the required flag. |
String |
getText()
Returns the value as a string |
void |
map(org.jdom.Element pxElement)
Maps the element into a DOM document. |
void |
service(HttpServletRequest pxRequest,
org.jdom.Element pxOldValue)
Process the returing HTTP request. |
void |
setErrorCode(String psCode)
Sets the error code. |
void |
setText(String psValue)
update the value |
void |
setToDefault(boolean pbRecursive)
Return value to the default settings. |
int |
validate(boolean pbRecursive)
validate the element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ERROR_TOO_SHORT
public static final String ERROR_TOO_LONG
Constructor Detail |
public Text(String psName, Object pxApplicationElement, FormElement pxParent, String psDefaultValue, boolean pbRequired, int pnMinLength, int pnMaxLength)
psName
- name of elementpsDefaultValue
- initial default valuepbRequired
- required elementpnMinLength
- minimum length allowpnMaxLength
- maximum length allowpxParent
- path to the parent in the xml treeMethod Detail |
public void map(org.jdom.Element pxElement)
map
in interface FormElement
pxElement
- parent element to add new elements ontopublic String getErrorCode()
getErrorCode
in interface FormElement
public String getName()
FormElement
getName
in interface FormElement
FormElement
public String getPath()
FormElement
getPath
in interface FormElement
FormElement
public Object getApplicationElement()
FormElement
getApplicationElement
in interface FormElement
FormElement
public boolean getRequired()
public String getText()
public void service(HttpServletRequest pxRequest, org.jdom.Element pxOldValue)
service
in interface FormElement
pxRequest
- http request to fetch data frompxOldValue
- form element details when the form was sent to the userpublic void setErrorCode(String psCode)
FormElement
setErrorCode
in interface FormElement
psCode
- error codeFormElement
public void setText(String psValue)
psValue
- new valuepublic void setToDefault(boolean pbRecursive)
setToDefault
in interface FormElement
pbRecursive
- on true set child elementspublic int validate(boolean pbRecursive)
validate
in interface FormElement
pbRecursive
- on true check child elements
protected String getDerivedType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |