You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by iv...@apache.org on 2002/11/02 07:59:30 UTC
cvs commit: xml-cocoon2/src/documentation/xdocs/howto/xmlform-wizard howto-xmlform-wizard-4.xml
ivelin 2002/11/01 22:59:30
Modified: src/documentation/xdocs/howto/xmlform-wizard
howto-xmlform-wizard-4.xml
Log:
updated HOWTO to reflect the fact that XMLForm handles automatically
unchecked check boxes when the form is session scoped.
Revision Changes Path
1.5 +20 -30 xml-cocoon2/src/documentation/xdocs/howto/xmlform-wizard/howto-xmlform-wizard-4.xml
Index: howto-xmlform-wizard-4.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/howto/xmlform-wizard/howto-xmlform-wizard-4.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- howto-xmlform-wizard-4.xml 22 Jun 2002 20:31:23 -0000 1.4
+++ howto-xmlform-wizard-4.xml 2 Nov 2002 06:59:30 -0000 1.5
@@ -299,51 +299,41 @@
* called in the beginning Form.populate()
* before population starts.
*
- * This is the place to handle unchecked checkboxes.
+ * This is NOT the place to handle unchecked checkboxes,
+ * if the form is stored in the session.
+ * The XMLForm framework will automatically handle unchecked
+ * check-boxes for session scope forms.
+ *
+ * Only request scoped forms need handle check boxes explicitly.
+ *
*
*/
public void reset( Form form )
{
- // based on the current form view
- // make some decisions regarding checkboxes, etc.
- String formView = getFormView();
- if ( formView.equals ( VIEW_INTEREST ) )
- {
- // deal with the organicGardening checkbox
+ // nothing to do here
+
+ // unchecked check boxes are handled automatically
+ // since this is a session scoped form
+
+ /*
+ No need for any of the following:
+
form.setValue( "/organicGardening", Boolean.FALSE );
- // deal with the cooking checkbox
form.setValue( "/cooking", Boolean.FALSE );
- // deal with the smallholdingManagement checkbox
form.setValue( "/smallholdingManagement", Boolean.FALSE );
- }
- else if ( formView.equals ( VIEW_GARDENING ) )
- {
- // deal with the flowers checkbox
+
form.setValue( "/flowers", Boolean.FALSE );
- // deal with the vegetables checkbox
form.setValue( "/vegetables", Boolean.FALSE );
- // deal with the fruitTrees checkbox
form.setValue( "/fruitTrees", Boolean.FALSE );
- }
- else if ( formView.equals ( VIEW_COOKING ) )
- {
- // deal with the traditionalReciepes checkbox
+
form.setValue( "/traditionalReciepes", Boolean.FALSE );
- // deal with the soups checkbox
form.setValue( "/soups", Boolean.FALSE );
- // deal with the veganCookery checkbox
form.setValue( "/veganCookery", Boolean.FALSE );
- }
- else if ( formView.equals ( VIEW_SMALLHOLDING ) )
- {
- // deal with the pigKeeping checkbox
+
form.setValue( "/pigKeeping", Boolean.FALSE );
- // deal with the pygmyGoats checkbox
form.setValue( "/pygmyGoats", Boolean.FALSE );
- // deal with the henKeeping checkbox
form.setValue( "/henKeeping", Boolean.FALSE );
- }
-
+ */
}
@@ -375,7 +365,7 @@
*/
public boolean filterRequestParameter (Form form, String parameterName)
{
- // TBD
+ // Nothing to do in this case
return false;
}
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org