cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] LeoLeonid WoodyFlowscriptAPI WoodyWidgetReference LeftMenuFooter DeleteMe Thu Nov 6 22:00:06 2003
Date Thu, 06 Nov 2003 21:00:06 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=LeoLeonid , version: 1 on Thu Nov  6 20:55:24
2003 by LeoLeonid

New page created:
+ a cocoon user.
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyFlowscriptAPI , version: 3 on Thu Nov 
6 20:24:49 2003 by BrunoDumon

+ \\
+ \\
+ 
+ !!Some techniques
+ 
+ !A button to end the form and show something else
+ ''(based on a hint by Sylvain Wallez on cocoon-dev)''
+ 
+ Suppose you want to have e.g. a cancel button on a form, so that when pressed, the form.showForm()
function returns and you can show another page.
+ 
+ Use something like this in the form defintion:
+ {{{
+ <wd:submit id="cancel" validate="false">
+    ...
+ </wd:submit>
+ }}}
+ 
+ Note that we use a submit widget, and not an action widget, since an action widget will
always redisplay the form.
+ 
+ Then in the flowscript you can check which button was pressed as follows:
+ 
+ {{{
+ form.showForm("form.html");
+ if (form.submitId == "cancel") {
+     cocoon.sendPage("cancel.html");
+ }
+ }}}
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyWidgetReference , version: 6 on Thu Nov
 6 20:02:57 2003 by BrunoDumon

- Used to trigger an action event on the server side. Usually presented as a button the user
can press (though this is not required).
+ Used to trigger an action event on the server side. Usually presented as a button the user
can press (though this is not required). When an action widget was activated, validation will
not be performed. This is because usually it would be strange to have other fields validated
when the user's intention wasn't really to submit the form. If you want validation to happen,
use the submit widget. After pressing an action button, the form will normally always be redisplayed,
unless the event handling code explicitely disables this (by using the endFormProcessing method
on the form object).
+ 
+ !!submit widget
+ The submit widget, usually rendered as a button, is used by the user to submit the form.
The submit widget is a special kind of action widget, thus also has the same functionality
as an action widget, however the submit widget does trigger validation and its purpose is
to end the form.
+ 
+ {{{
+ <wd:submit id="..." action-command="..." validate="true|false">
+   <wd:label>...</wd:label>
+   <wd:help>...</wd:help>
+   <wd:hint>...</wd:hint>
+   <wd:on-action>
+     ...
+   </wd:on-action>
+ </wd:submit>
+ }}}
+ 
+ The optional attribute validate, which is true by default, can be used to disable validation.
The difference between an action widget and a submit widget with validate="false" is that
a submit widget with validate="false" will end form processing, thus the form will not be
redisplayed (ultimately, it is of course the controller who decides this, but the forms hint
towards the controller is that it shouldn't be redisplayed, and this is exactly what the flowscript
integration library does).


Page: http://wiki.cocoondev.org/Wiki.jsp?page=LeftMenuFooter , version: 21 on Thu Nov  6 20:32:26
2003 by StevenNoels

- [Cocoon|http://xml.apache.org/cocoon/]\\
?                ^^^            -------

+ [Cocoon|http://cocoon.apache.org/]\\
?                ^^^^^^

- [Outerthought|http://outerthought.org/]\\
?                                        --

+ [Outerthought|http://outerthought.org/]


Page: http://wiki.cocoondev.org/Wiki.jsp?page=DeleteMe , version: 24 on Thu Nov  6 20:30:39
2003 by StevenNoels

+ * add bogus pages here
- * [http://wiki.cocoondev.org/Wiki.jsp?page=The+Pyramid+Model] - Note this is diferent of
[ThePyramidModel]
- * [3DFileUploadWithAction]



Mime
View raw message