|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jolene.dom.HTMLElement
net.sf.jolene.dom.Form
public final class Form
A form in a html document. This acts as a container for other html objects.
Method Summary | |
---|---|
Form |
clone()
Core clone implementation. |
HTMLElement |
elements(int element)
This method returns the widget specified by the numeric index. |
HTMLElement |
elements(java.lang.String elementName)
This method retrieves an object from the document by name or id. |
int |
getElementCount()
|
Grid |
getGrid(java.lang.String name)
Returns the specified element casted to a Grid object. |
java.util.Map<java.lang.String,HTMLElement> |
getRadioGroup(java.lang.String groupName)
Returns a Map of Radio objects based the specified radio group name. |
Select |
getSelect(java.lang.String name)
Returns the specified element casted to a Select object. |
boolean |
hasElement(java.lang.String name)
Checks if the specified object exists in the form. |
void |
populate(java.util.Map<java.lang.String,java.lang.String> map)
Populates the form object from the supplied map object. |
void |
populate(java.lang.Object bean)
Poplates the form objects based on the supplied java bean. |
Methods inherited from class net.sf.jolene.dom.HTMLElement |
---|
clear, getAfterText, getAttribute, getBeforeText, getContent, getName, getStyle, getTag, getValue, hasAttribute, hasStyle, isChecked, isDisabled, isReadonly, isRenderable, keySet, removeAttribute, removeStyle, resetStyles, resetStyles, setAfterText, setAttribute, setBeforeText, setChecked, setContent, setDisabled, setName, setReadonly, setRenderable, setStyle, setStyles, setStyles, setValue, swapWith, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Form clone()
HTMLElement
clone
in class HTMLElement
DocumentFactory
public HTMLElement elements(int element)
element
- - The integer element number of the object desired.
public HTMLElement elements(java.lang.String elementName)
Grid grid grid = (Grid)document.forms(0).elements("Grid1");or use the appropriate getter:
Grid grid = document.forms(0).getGrid("Grid1");
elementName
- - The string name or id of the object desired.
public int getElementCount()
public Grid getGrid(java.lang.String name)
name
- name of grid
public java.util.Map<java.lang.String,HTMLElement> getRadioGroup(java.lang.String groupName)
groupName
- of radios
public Select getSelect(java.lang.String name)
name
- name of select
public boolean hasElement(java.lang.String name)
name
- name to check
public void populate(java.lang.Object bean) throws FormPolulateException
bean
- any object which can be examined by BeanUtils.
FormPolulateException
- if BeanUtils fails.public void populate(java.util.Map<java.lang.String,java.lang.String> map)
map
- - name/values where names match element names
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |