|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjet.html.core.JetComponent
jet.html.core.JetChildComponent
jet.html.core.JetParentComponent
jet.html.impl.JetForm
public class JetForm
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jet.html.JetChildComponent |
|---|
JetChildComponent.HasNoParent |
| Field Summary | |
|---|---|
protected java.lang.String |
acceptCharset
accept-charset |
protected java.lang.String |
action
The action url of the form |
protected java.lang.String |
ajaxjavascript
Cache for generated javascript |
protected java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> |
ajaxvalidations
Holds the client validations |
protected java.lang.StringBuilder |
builder
internal buffer do render form |
protected java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> |
clientvalidations
Holds the client validations |
private int |
cols
default cols rendering |
protected java.util.Collection |
displayMessages
|
protected java.util.HashMap |
elements
Hashmap holding all html input elements like textbos, checkbox etc for faster access |
protected java.lang.String |
enctype
encoding type |
protected boolean |
fileUpload
Indicates if the form has a file uploaded |
protected java.lang.String |
formheader
prerendered form header information |
protected java.lang.String |
javascript
Cache for generated ajax javascript |
protected org.apache.log4j.Logger |
log
Internal logger object |
protected java.lang.String |
method
Holds throws form submit type |
protected java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> |
servervalidations
Holds the server validations |
| Fields inherited from class jet.html.core.JetComponent |
|---|
eventSupport |
| Fields inherited from interface jet.html.JetForm |
|---|
GET, POST |
| Constructor Summary | |
|---|---|
JetForm(java.lang.String identifier)
Creates new Component - name and styleclass would be the same as identifier |
|
JetForm(java.lang.String identifier,
java.lang.String styleclass)
Creates new Component |
|
JetForm(java.lang.String identifier,
java.lang.String name,
java.lang.String styleclass)
Creates new Component |
|
| Method Summary | |
|---|---|
protected void |
addElement(JetComponent element)
|
void |
addValidation(JetComponent component,
java.util.List validationRules)
|
void |
buildHashmap()
|
java.lang.Object |
clone()
This method retruns a clone from the component |
JetForm |
copy()
|
java.lang.String |
decode(JetContext jetContext)
This method decodes the form with the given messages |
void |
decodeForm(java.lang.StringBuilder builder,
JetContext jetContext)
This method decodes the form with the given messages |
java.lang.String |
decodeGetString(JetContext jetContext)
Method to decode GET string fro childs |
java.util.Collection |
findComponent(java.lang.Class c)
|
JetComponent |
findComponent(java.lang.String identifier)
Method to get component by identifier |
java.lang.String |
getAcceptCharset()
|
java.lang.String |
getAction()
Returns the action url |
java.lang.String |
getAjaxValidation(JetContext context,
boolean hasClientValidation,
boolean renderScriptTags)
|
java.util.HashMap |
getAjaxValidationRules()
Returns ajax validations |
java.util.HashMap |
getClientValidationRules()
Returns client validations |
int |
getCols()
|
protected JetComponent |
getElement(java.lang.String identifier)
|
protected java.util.Collection |
getElements(java.lang.Class c)
|
java.lang.String |
getEnctype()
Returns the encoding type of the form |
java.lang.String |
getJavascriptValidation(JetContext context,
boolean renderScriptTags,
boolean formtag)
|
java.lang.String |
getMethod()
Returns the form method GET/POST |
java.util.HashMap |
getServerValidationRules()
Returns server validations |
boolean |
hasAjaxValidations()
indicates if ajax validations exists |
boolean |
hasClientValidations()
indicates if client side validations exists |
boolean |
hasFileUpload()
Returns if the form has a file |
boolean |
hasServerValidations()
indicates if server side validations exists |
boolean |
hasValues()
Method to indicate if the form has values |
void |
reset()
This method resets the value - need by ObjectPool |
void |
setAcceptCharset(java.lang.String acceptCharset)
|
void |
setAction(java.lang.String action)
Set the action url |
protected void |
setAjaxValidationRules(java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> ajaxvalidations)
|
protected void |
setClientValidationRules(java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> clientvalidations)
|
void |
setCols(int cols)
|
void |
setEnctype(java.lang.String enctype)
Set the encoding type |
void |
setHasFileUpload(boolean val)
Set if the form has a file uploaded |
void |
setMethod(java.lang.String method)
Set the form method |
protected void |
setServerValidationRules(java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> servervalidations)
|
| Methods inherited from class jet.html.core.JetParentComponent |
|---|
add, add, encode, getChild, getChilds, remove, setChilds |
| Methods inherited from class jet.html.core.JetChildComponent |
|---|
getForm, getParent, isHidden, setParent, toggleHidden |
| Methods inherited from class jet.html.core.JetComponent |
|---|
addListener, addListener, componentChanged, findComponents, getGeneratedComponentIdentifier, getIdentifier, getName, getNewIdentifier, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jet.html.JetForm |
|---|
findComponents |
| Methods inherited from interface jet.html.JetParentComponent |
|---|
add, add, encode, getChild, getChilds, remove, setChilds |
| Methods inherited from interface jet.html.JetChildComponent |
|---|
getForm, getParent, isHidden, setParent, toggleHidden |
| Methods inherited from interface jet.html.JetComponent |
|---|
addListener, addListener, componentChanged, getIdentifier, getName, getStyleclass, incrementIdentifier, removeListener, removeListener, setComponentChanged, setContinueIdentifier, setIdentifier, setName, setStyleclass |
| Methods inherited from interface jet.pool.Identifiable |
|---|
getIdentifier |
| Field Detail |
|---|
protected java.util.HashMap elements
private int cols
protected org.apache.log4j.Logger log
protected java.lang.String ajaxjavascript
protected java.lang.String javascript
protected java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> servervalidations
protected java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> clientvalidations
protected java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> ajaxvalidations
protected java.lang.StringBuilder builder
protected java.lang.String formheader
protected java.util.Collection displayMessages
protected java.lang.String action
protected java.lang.String method
protected java.lang.String enctype
protected java.lang.String acceptCharset
protected boolean fileUpload
| Constructor Detail |
|---|
public JetForm(java.lang.String identifier)
identifier - the identifier
public JetForm(java.lang.String identifier,
java.lang.String styleclass)
identifier - the identifierstyleclass - the css style class
public JetForm(java.lang.String identifier,
java.lang.String name,
java.lang.String styleclass)
identifier - the identifiername - the name of the component if different to identifierstyleclass - the css style class| Method Detail |
|---|
public void decodeForm(java.lang.StringBuilder builder,
JetContext jetContext)
decodeForm in interface DecodeabledecodeForm in interface JetComponentdecodeForm in interface JetFormdecodeForm in class JetComponentbuilder - Stringbuilder
public java.lang.String decodeGetString(JetContext jetContext)
throws java.io.UnsupportedEncodingException
JetParentComponent
decodeGetString in interface JetFormdecodeGetString in interface JetParentComponentdecodeGetString in class JetParentComponentjava.io.UnsupportedEncodingExceptionpublic java.lang.String decode(JetContext jetContext)
decode in interface JetFormjetContext - JetContextpublic java.lang.Object clone()
clone in interface JetComponentclone in interface JetFormclone in class JetComponentpublic java.lang.String getAction()
getAction in interface JetFormpublic void setAction(java.lang.String action)
setAction in interface JetFormaction - the action urlpublic java.lang.String getEnctype()
getEnctype in interface JetFormpublic void setEnctype(java.lang.String enctype)
setEnctype in interface JetFormenctype - encoding type of the formpublic java.lang.String getMethod()
getMethod in interface JetFormpublic void setMethod(java.lang.String method)
setMethod in interface JetFormmethod - the form methodpublic boolean hasFileUpload()
hasFileUpload in interface JetFormpublic void setHasFileUpload(boolean val)
setHasFileUpload in interface JetFormval - boolean if file is uploadedpublic void reset()
reset in interface JetFormreset in interface JetParentComponentreset in interface Resetablereset in class JetParentComponentpublic boolean hasServerValidations()
hasServerValidations in interface JetFormpublic boolean hasClientValidations()
hasClientValidations in interface JetFormpublic boolean hasAjaxValidations()
hasAjaxValidations in interface JetFormpublic java.util.HashMap getServerValidationRules()
getServerValidationRules in interface JetFormpublic java.util.HashMap getAjaxValidationRules()
getAjaxValidationRules in interface JetFormpublic java.util.HashMap getClientValidationRules()
getClientValidationRules in interface JetForm
public void addValidation(JetComponent component,
java.util.List validationRules)
addValidation in interface JetFormprotected void setServerValidationRules(java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> servervalidations)
protected void setClientValidationRules(java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> clientvalidations)
protected void setAjaxValidationRules(java.util.HashMap<java.lang.String,java.util.List<ValidationRule>> ajaxvalidations)
public java.lang.String getAjaxValidation(JetContext context,
boolean hasClientValidation,
boolean renderScriptTags)
getAjaxValidation in interface JetForm
public java.lang.String getJavascriptValidation(JetContext context,
boolean renderScriptTags,
boolean formtag)
getJavascriptValidation in interface JetFormpublic boolean hasValues()
hasValues in interface JetFormpublic java.lang.String getAcceptCharset()
getAcceptCharset in interface JetFormpublic void setAcceptCharset(java.lang.String acceptCharset)
setAcceptCharset in interface JetFormprotected void addElement(JetComponent element)
protected JetComponent getElement(java.lang.String identifier)
protected java.util.Collection getElements(java.lang.Class c)
public void buildHashmap()
buildHashmap in interface JetFormpublic JetComponent findComponent(java.lang.String identifier)
JetComponent
findComponent in interface JetComponentfindComponent in interface JetFormfindComponent in class JetComponentpublic java.util.Collection findComponent(java.lang.Class c)
public int getCols()
getCols in interface JetFormpublic void setCols(int cols)
setCols in interface JetFormpublic JetForm copy()
copy in interface JetForm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||