cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] JanHoskens WoodyFlowscriptAPI People Tue Feb 24 16:00:04 2004
Date Tue, 24 Feb 2004 15:00:05 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=JanHoskens , version: 2 on Tue Feb 24 15:03:37
2004 by JanHoskens

+ I was looking for some documentation on JXTemplateGenerator/flow to see how/if it can replace
my XSP's. But found nothing here, so I'll start a page with the basic info found in the api's
(so you won't have to go through your api anymore)
+ [JXTemplateGenerator]
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyFlowscriptAPI , version: 5 on Tue Feb 24
15:20:21 2004 by BertVK

+ !A button in each row of a repeater-widget to show details of that row
+ 
+ When you add the submit widget in a repeater row, you can check the value of the row ID
and use that for further processing.
+ 
+ In the flow go up one level to the Parent node and then decend to the rowID node. Request
the value of that node.
+ 
+ In the sample below the rowID is printed to the console. You can put it in the request,
session, global variable, ... for further processing.
+ 
+ Put something like this in the form definition doc. The action-command attribute is not
used here, but has to be entered.
+ {{{
+ <wd:submit id="showRow" action-command="showRowAction">
+   <wd:label>Edit Row</wd:label>
+ </wd:submit>
+ }}}
+ 
+ The form template simply gets a widget in the repeater-widget
+ {{{
+ <wt:widget id="showRow"/>
+ }}}
+ 
+ In the Flow you can request the value of the rowID and use that value for further processing.
Here it's added to the URL as a request parameter.
+ {{{
+ if (form.submitId == "showRow") {
+   var thisRow = form.getWidget().getSubmitWidget().getParent();
+   print("rowID = " +thisRow.getWidget("rowID").getValue());
+   cocoon.sendPage("rowPage?rowID=" + rowID);
+ } else {
+   cocoon.sendPage("resultPage");
+ }
+ }}}
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=People , version: 258 on Tue Feb 24 14:51:17
2004 by JanHoskens

+ * [Jan Hoskens] -- Cocoon user



Mime
View raw message