Mark Lundquist wrote:
Hi,

I'm working on a time-reporting application with a form that contains "day of the week" input fields for Sun-Sat (into which the user enters their daily hours). I'm looking for a way to aggregate those daily hours fields within the form model so that I can easily iterate across them in the flowscript.

I thought that I might be able to do that using <fd:group>, but I realized I don't know how to traverse the resulting form instance in the flowscript (where do I find the widgets), and (probably related) I don't know how to designate them in the JXT.


Not sure from your description if fd:group is the best tool for your goal, but I'll try to answer your questions.

In flowscript, you can traverse the widget tree with the form instance's lookupWidget method:

   form.lookupWidget("groupA/groupB/field");

The argument is an xpath-like syntax. Your fd:groups are container widgets so they'll be nodes in the path.

In your JXTemplate, you use the ft:group element. See the Template section on http://cocoon.apache.org/2.1/userdocs/widgets/widget_group.html and let us know if you have any more questions.

HTH
--Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to