cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <>
Subject Re: Difference between fi:group and ft:group
Date Fri, 14 Jul 2006 12:27:29 GMT
Hi Andrew,
ft:group is a logical grouping, you define an fd:group in the
definition, then use it in the binding and in the template. It's used to
make some actions easier. For example, if you want to set the state of
10 widgets disables, you just need to set the group disables, the
widgets contained in it will inherit the state. It's also very useful
when using form libraries, cause you can define a group in a library and
then use it in your forms.

The fi:group is only the view part of it. That means that a fi:group has
no logical function, it's not a widget, is not declared in the
definition or in the binding, but it's simply a pagination feature in
the form template. The form template can contain HTML, but that's not
the suggested way of doing it, instead it would be better to define your
layout using fi:groups and then customize the CSS (or your XSLT) to
obtain the desired layout.

In the template, ft:group and fi:group use the same syntax (they both
result in a fi:group in the form instance), but ft:group needs an id
since it refers to an fd:group in the definition, while fi:group does
not need it since it's just a view construct.

Hope this helps,

Andrew Madu wrote:

> Hi,
> can someone tell me what the difference is between an fi:group and
> ft:group? I ask i relation to:
> Quote:
>       'Container widgets must enclose a container element
> The Ajax support of Cocoon Forms works by sending partial page updates
> to the browser. This requires the representation of widgets to be
> contained in a single element, which becomes the "replacement unit"
> for that widget.
> The styling stylesheets take care of this for terminal widgets such as
> fields and actions, but not for container widgets whose layout are
> completely defined by the page template. Concretely, this means that
> <ft:repeater>, <ft:group> and <ft:union> instructions must contain
> single element such as HTML <div>, <table>, <span>, etc.
><ft:group id="info">
>  <div>
>    <p><ft:widget id="foo"/></p>
>    <p><ft:widget id="bar"/></p>
>  </div>
></ft:group> '
> In my jx I have the following type of widget definitions:
>                         <fi:group>
>                             <fi:items>
>                               <ft:widget id="credit">
>                                 <fi:styling class="keyinbox"
> submit-on-change="true"/>
>                               </ft:widget>
>                             </fi:items>
>                         </fi:group>
> Is it required in this example to wrap the ft:widget section inside
> <DIV /> tags?
> regards
> Andrew

Simone Gianni

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message