|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.SimpleTagSupport
nl.gx.webmanager.taglib.FormTag
public class FormTag
Implements the < wm:form > tag. Returns an HTML form tag and a (number of) hidden input tags enclosed in it. Additional inputs can be defined in the body of the < wm:form > tag. The < wm:form > tag is a very complicated piece of functionality that is mostly used to render various types of forms such as the poll form, the ecard form, or forms defined in the forms module. All these forms are processed by the FormHandler which runs on the frontend and processes forms submitted by users. This FormHandler expects several inputs in the form. The < wm:form > tag automatically generates these. What exactly is generated, depends on the handle. Currently the following builtin handles are supported in the < wm:form > tag:
< wm:form handle="search" onSubmit="doSearch();" > < input type="text" name="keyword" /> < /wm:form >The example above displays a search form (handle="search"). A search form should specify a keyword, therefore an input is included to set the keyword (using the HTML input tag). Also some javascript should be executed if the form is submitted. The onSubmit parameter takes care of that.
< wm:form handle="form" onSubmit="return checkForm${formElementId}();" >
< input name="dummybutton" type="image" value="" alt="" src="${presentationcontext.website.emptyImage}"
style="position: absolute; border-style: none; padding: 0; spacing: 0; text-indent: 0;" height="0" width="0" />
< wm:render object="${formElement.form}" />
< /wm:form >
Example of usage (3):
< wm:form handle="formback" />This prints the back button in a form.
| Constructor Summary | |
|---|---|
FormTag()
|
|
| Method Summary | |
|---|---|
void |
doTag()
|
protected java.lang.String |
getExtraPassOn()
Return a comma-separated list of extra parameters to be used in generating the URL in the form or null if it is not set. |
protected java.lang.String |
getFrame()
Return frame name or null if it is not set. |
protected java.lang.String |
getHandle()
Return the name of the handle that should be used. |
protected java.lang.String |
getOnSubmit()
Return the name of the Javascript function to be used in the 'onSubmit=?...?' attribute of the resulting HTML form tag or null if it is not set. |
protected java.lang.String |
getTarget()
Return the name of the HTML frame to be used in the 'target=?...?' attribute of the resulting HTML form tag or null if the target attribute is not set. |
protected boolean |
isWebGuidelinesCompliant()
Returns webGuidelinesCompliant is requested true or false,
false if it is not set. |
void |
setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value)
|
void |
setExtraPassOn(java.lang.String extraPassOn)
Specifies a comma-separated list of extra parameters to be used in generating the URL in the form. |
void |
setFrame(java.lang.String frame)
Setter for optional attribute frame. |
void |
setHandle(java.lang.String handle)
Sets the name of the handle that should be used. |
void |
setOnSubmit(java.lang.String onSubmit)
Specifies the name of the Javascript function to be used in the 'onSubmit=?...?' attribute of the resulting HTML form tag. |
void |
setTarget(java.lang.String target)
Specifies the name of the HTML frame to be used in the 'target=?...?' attribute of the resulting HTML form tag. |
void |
setWebGuidelinesCompliant(boolean webGuidelinesCompliant)
Sets the optional attribute webGuidelinesCompliant. |
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
|---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormTag()
| Method Detail |
|---|
public void setHandle(java.lang.String handle)
handle - the name of the handle that should be used.protected java.lang.String getHandle()
public void setDynamicAttribute(java.lang.String uri,
java.lang.String localName,
java.lang.Object value)
setDynamicAttribute in interface javax.servlet.jsp.tagext.DynamicAttributespublic void setExtraPassOn(java.lang.String extraPassOn)
extraPassOn - Comma-separated list of extra passOn-parameters for the URL in the formUrlBuilderprotected java.lang.String getExtraPassOn()
public void setOnSubmit(java.lang.String onSubmit)
onSubmit - javascript function nameprotected java.lang.String getOnSubmit()
public void setTarget(java.lang.String target)
target - , for example _self, _blank, _parent, _top or the name of a frame.protected java.lang.String getTarget()
public void setFrame(java.lang.String frame)
frame - name of a frame as specified in the layout descriptorprotected java.lang.String getFrame()
public final void setWebGuidelinesCompliant(boolean webGuidelinesCompliant)
webGuidelinesCompliant - indicates web-guidelines complianceprotected final boolean isWebGuidelinesCompliant()
true or false,
false if it is not set.
true or false, false if it is not set.
public void doTag()
throws javax.servlet.jsp.JspException,
java.io.IOException
doTag in interface javax.servlet.jsp.tagext.SimpleTagdoTag in class javax.servlet.jsp.tagext.SimpleTagSupportjavax.servlet.jsp.JspException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||