You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark Lundquist <lu...@gmail.com> on 2007/07/31 18:40:45 UTC
[CForms] q'n about
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.
Any help?
thx-a-lot,
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [CForms] q'n about
Posted by Jason Johnston <co...@lojjic.net>.
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org