|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colle.forms.FormSet
Manages a finite set of information the user can choose from. Often displayed in a set of checkboxes or a drop list. Created: 10 Jul 2001
Field Summary |
Fields inherited from interface net.sf.colle.forms.FormElement |
ERROR_INVALID, ERROR_REQUIRED, UNKNOWN, VALID |
Constructor Summary | |
FormSet(String psName,
Object pxApplicationElement,
FormElement pxParent,
boolean pbDataBinding)
Create a new FormSet element. |
Method Summary | |
void |
clearSelected()
Clears all currently selected values. |
Object |
getApplicationElement()
Returns the application object that corresponds to this form object. |
abstract String[] |
getDefaultIds()
Return the default ids. |
String |
getErrorCode()
Returns the error code of the element |
String |
getFirstSelected()
Return the selected ids. |
abstract Set |
getIds()
Return all the ids. |
String |
getName()
Returns the name of the the form element. |
String |
getPath()
Returns the path to the form element. |
abstract boolean |
getRequired()
Returns the required flag. |
Set |
getSelected()
Return the selected ids. |
boolean |
isSelected(String psValue)
Check that the set value has been selected. |
void |
map(org.jdom.Element pxElement)
Maps the element into a DOM document. |
void |
service(HttpServletRequest pxRequest,
org.jdom.Element pxOldValue)
Process the returning HTTP request. |
void |
setErrorCode(String psCode)
Sets the error code. |
void |
setSelected(String[] pxValues)
Clear current list of selected ids and set new ones. |
void |
setSelected(String psId,
boolean pbValue)
Set the selected state of an Id. |
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 |
Constructor Detail |
public FormSet(String psName, Object pxApplicationElement, FormElement pxParent, boolean pbDataBinding)
psName
- name of elementpxParent
- path to the parent in the xml treepbDataBinding
- the dataset is fully or partially derivedMethod Detail |
public void clearSelected()
public boolean isSelected(String psValue)
psValue
- Set value to be checked
public Set getSelected()
public String getFirstSelected()
public void setSelected(String psId, boolean pbValue)
psId
- Id to be selectedpbValue
- value, true is selectedpublic void setSelected(String[] pxValues)
pxValues
- new selected valuespublic abstract String[] getDefaultIds()
public abstract Set getIds()
public abstract boolean getRequired()
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
Form
public String getPath()
FormElement
getPath
in interface FormElement
FormElement
public Object getApplicationElement()
FormElement
getApplicationElement
in interface FormElement
FormElement
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 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |