|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pajes.html.Tag
org.pajes.html.Input
org.pajes.html.Submit
public abstract class Submit
This abstract class is extended by classes that provide the ability to select an HTML element on a form that will submit the contents of the form for processing.
| Field Summary |
|---|
| Fields inherited from class org.pajes.html.Input |
|---|
TYPE_ATTRIBUTE |
| Fields inherited from class org.pajes.html.Tag |
|---|
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT |
| Constructor Summary | |
|---|---|
protected |
Submit(java.lang.String type)
Default constructor intialises some internal fields. |
| Method Summary | |
|---|---|
protected InputHidden |
getHiddenField()
Returns the hidden field that will be updated with the specified value when the submit is requested. |
protected java.lang.String |
getHiddenFieldValue()
Returns value that will be placed in the specified hidden field when the submit is requested. |
protected HTML |
getInactiveText()
Sets the HTML object that will be displayed if the submit function is inactive. |
boolean |
isActive()
Returns whether the default active object will be displayed, or whether the inactive object will to be shown. |
protected boolean |
isOnChangeCheckingDisabled()
Returns whether if the check for changed fields is to executed. |
protected boolean |
isOnClickValidationDisabled()
Returns whether on click validation is to be executed. |
Submit |
setActive(boolean status)
Sets whether the default active object is to be displayed, or whether the inactive object is to be shown. |
protected void |
setChanged(Browser browser)
Over-rides Input.setChanged(Browser) so that
submitting a form will not set the changed flag. |
Submit |
setCheckForChangedFields(boolean enable)
Enables or disables check for changed fields before submitting when on click validation has been disabled on the constructor. |
Submit |
setCheckForChangedFieldsConfirmation(java.lang.String text)
Sets the text that will be displayed in a JavaScript confirm() function if any fields have been changed. |
Submit |
setHiddenField(InputHidden hiddenField,
java.lang.String fieldValue)
The specified hidden field will be updated with the specified value when the button is pushed. |
Submit |
setInactiveText(HTML object)
Sets the HTML object that will be displayed if the anchor is inactive. |
Submit |
setInactiveText(java.lang.String text)
Sets the text that will be displayed if the anchor is inactive. |
Submit |
setOnClickValidation(boolean enable)
Enables or disables validation of fields before submitting. |
Submit |
setSubmitConfirmation(java.lang.String text)
Sets the text that will be displayed in a JavaScript confirm() function prior to actually submitting the form, so that the user has a chance to confirm the action. |
void |
write(Browser browser)
Writes the submit tag to the browser. |
protected void |
writeSubmitJavaScript(Browser browser,
java.lang.StringBuilder onClickHandler)
Called by the write(org.pajes.servlet.Browser) method to append the appropriate JavaScript
to the OnClick handler written to the browser to handle the form
submission. |
protected void |
writeTag(Browser browser)
Called by the write(org.pajes.servlet.Browser) method to write the actual tag to the
browser. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Submit(java.lang.String type)
type - the type attribute of the <input> tag.| Method Detail |
|---|
public boolean isActive()
public Submit setActive(boolean status)
status - true if the default active object is to be displayed and the
anchor should respond to the click, or false if the inactive
object is to be displayed and should not respond to a click.
public Submit setCheckForChangedFields(boolean enable)
enable - true if the check for changed fields is to executed (the
default), or false to disable.
setCheckForChangedFieldsConfirmation(java.lang.String)public Submit setCheckForChangedFieldsConfirmation(java.lang.String text)
text - the text to be displayed in the confirmation message. If null
or an empty string is specified, the default value will be
used.
setCheckForChangedFields(boolean)
public Submit setHiddenField(InputHidden hiddenField,
java.lang.String fieldValue)
hiddenField - the hidden field input element whish will be updated when the
button is pressed.fieldValue - the value to set in the hidden field.
public Submit setInactiveText(HTML object)
inactive.
object - is the object to be displayed when the anchor is inactive.
public Submit setInactiveText(java.lang.String text)
inactive.
text - is the text to be displayed when the anchor is inactive.
public Submit setOnClickValidation(boolean enable)
enable - if false, disables the onClick validation.
public Submit setSubmitConfirmation(java.lang.String text)
Note that this is NOT the text to be displayed if onClick validation has been disabled.
text - is the text to be displayed.
public void write(Browser browser)
throws java.io.IOException
write in interface HTMLwrite in class Inputbrowser - the browser to which the results are to be output.
java.io.IOException - if an I/O error occurs writing to the browser.Tag.setWriteEndTag(boolean),
Tag.writeContent(org.pajes.servlet.Browser)protected InputHidden getHiddenField()
protected java.lang.String getHiddenFieldValue()
protected HTML getInactiveText()
inactive.
protected boolean isOnChangeCheckingDisabled()
protected boolean isOnClickValidationDisabled()
protected void setChanged(Browser browser)
Input.setChanged(Browser) so that
submitting a form will not set the changed flag.
setChanged in class Inputbrowser - the browser to which the tag is being written.Input.setChanged(Browser)
protected void writeSubmitJavaScript(Browser browser,
java.lang.StringBuilder onClickHandler)
write(org.pajes.servlet.Browser) method to append the appropriate JavaScript
to the OnClick handler written to the browser to handle the form
submission.
browser - the browser to which the results are to be output.onClickHandler - the onClickHandler to which the JavaScript code should be
appended.
protected void writeTag(Browser browser)
throws java.io.IOException
write(org.pajes.servlet.Browser) method to write the actual tag to the
browser.
browser - the browser to which the results are to be output.
java.io.IOException - if an I/O error occurs writing to the browser.
|
PAJES 3.0.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||