|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.sociology.forms.Form
public class Form
This class represents a set of data input elements that are represented by
FormElement objects. The instantiation and initialization
of one Form object is done only once when parsing the forms.xml file.
The Form object is then serialized for later use in producing instances
of class Form (for each new client request).
FormElement,
FieldValidator,
GroupValidator,
FormHandler,
SimpleContentGenerator,
Serialized Form| Constructor Summary | |
|---|---|
Form()
|
|
| Method Summary | |
|---|---|
java.io.StringReader |
generateXML()
Returns a StringReader object that contains this form presentation data in XML format. |
java.lang.String |
generateXmlAsString()
Returns a String that contains this form presentation data in an XML format. |
java.lang.String |
getFormActionPath()
This method returns the form's "action" path that was entered through the form tag's action attribute (in forms.xml). |
FormElement[] |
getFormElements()
This method returns an array of all FormElement-s
of this form. |
java.lang.String |
getFormPagePath()
This method returns the URL path to the presentation page of this form. |
java.lang.String |
getName()
Gets the name of this Form object. |
boolean |
isFirstime()
This method returns a flag that shows whether this is the first time the form is shown to the current user, or otherwise. |
boolean |
isUnboundBeforeActionPage()
This method returns a flag that defines one of the two following behaviors : true - once the form validation goes well,
the user session must be cleared of the Form object
and of any other object related with it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Form()
| Method Detail |
|---|
public java.lang.String getName()
Form object.
In forms.xml, the user sets the name of the form via
the name attribute of the form tag.
Form object.public boolean isUnboundBeforeActionPage()
true - once the form validation goes well,
the user session must be cleared of the Form object
and of any other object related with it.
This work has to be done in the forwardToFormAction() method of
the ContentGenerator.
false - the user session must not get cleared of the
Form object or of any other object related with it, even
after the successful form validation.
This is specifically useful in the case you use a confirmation page
as the "action" of your form. In this case, not clearing the session means that if the
user wants to go back from the confirmation page to the form, the last
entries will still be preserved.
In forms.xml, the user sets the value of this flag via the unbound attribute
of the form tag.
public boolean isFirstime()
sendFormContent() method of
the ContentGenerator.
See the source code of SimpleContentGenerator as an
example.
public FormElement[] getFormElements()
FormElement-s
of this form.
This method can be used by a ContentGenerator class.
See the source code of SimpleContentGenerator for such an
example.
FormElement-s.public java.lang.String getFormPagePath()
page
of form tag. This path should be relative to application root.
This method has to be used by ContentGenerator classes.
See the source code of SimpleContentGenerator as an example.
public java.lang.String getFormActionPath()
form tag's action attribute (in forms.xml).
This path should be relative to application root.
This method has to be used by ContentGenerator classes.
See the source code of SimpleContentGenerator as an example.
public java.io.StringReader generateXML()
ContentGenerator classes for
generating the presentation of this form in any desired format, HTML included.
public java.lang.String generateXmlAsString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||