|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.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 identifierpublic JetForm(java.lang.String identifier, java.lang.String styleclass)
identifier
- the identifierstyleclass
- the css style classpublic 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 classMethod Detail |
---|
public void decodeForm(java.lang.StringBuilder builder, JetContext jetContext)
decodeForm
in interface Decodeable
decodeForm
in interface JetComponent
decodeForm
in interface JetForm
decodeForm
in class JetComponent
builder
- Stringbuilderpublic java.lang.String decodeGetString(JetContext jetContext) throws java.io.UnsupportedEncodingException
JetParentComponent
decodeGetString
in interface JetForm
decodeGetString
in interface JetParentComponent
decodeGetString
in class JetParentComponent
java.io.UnsupportedEncodingException
public java.lang.String decode(JetContext jetContext)
decode
in interface JetForm
jetContext
- JetContextpublic java.lang.Object clone()
clone
in interface JetComponent
clone
in interface JetForm
clone
in class JetComponent
public java.lang.String getAction()
getAction
in interface JetForm
public void setAction(java.lang.String action)
setAction
in interface JetForm
action
- the action urlpublic java.lang.String getEnctype()
getEnctype
in interface JetForm
public void setEnctype(java.lang.String enctype)
setEnctype
in interface JetForm
enctype
- encoding type of the formpublic java.lang.String getMethod()
getMethod
in interface JetForm
public void setMethod(java.lang.String method)
setMethod
in interface JetForm
method
- the form methodpublic boolean hasFileUpload()
hasFileUpload
in interface JetForm
public void setHasFileUpload(boolean val)
setHasFileUpload
in interface JetForm
val
- boolean if file is uploadedpublic void reset()
reset
in interface JetForm
reset
in interface JetParentComponent
reset
in interface Resetable
reset
in class JetParentComponent
public boolean hasServerValidations()
hasServerValidations
in interface JetForm
public boolean hasClientValidations()
hasClientValidations
in interface JetForm
public boolean hasAjaxValidations()
hasAjaxValidations
in interface JetForm
public java.util.HashMap getServerValidationRules()
getServerValidationRules
in interface JetForm
public java.util.HashMap getAjaxValidationRules()
getAjaxValidationRules
in interface JetForm
public java.util.HashMap getClientValidationRules()
getClientValidationRules
in interface JetForm
public void addValidation(JetComponent component, java.util.List validationRules)
addValidation
in interface JetForm
protected 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 JetForm
public boolean hasValues()
hasValues
in interface JetForm
public java.lang.String getAcceptCharset()
getAcceptCharset
in interface JetForm
public void setAcceptCharset(java.lang.String acceptCharset)
setAcceptCharset
in interface JetForm
protected 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 JetForm
public JetComponent findComponent(java.lang.String identifier)
JetComponent
findComponent
in interface JetComponent
findComponent
in interface JetForm
findComponent
in class JetComponent
public java.util.Collection findComponent(java.lang.Class c)
public int getCols()
getCols
in interface JetForm
public void setCols(int cols)
setCols
in interface JetForm
public JetForm copy()
copy
in interface JetForm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |