cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Salvetti" <salvetti.m...@gmail.com>
Subject Re: Repeater in form
Date Wed, 05 Apr 2006 11:22:48 GMT
Hi Simone, thanks for your help,

i understand it's a template problem, but since the template is generated
from the meta-bind, the error should be here :

          <meta:group label="Resources" styling-layout="columns">
                <meta:group label="Resources" styling-layout="columns">
                    <fb:simple-repeater id="resources"
parent-path="resources" row-path="resource">
                        <fb:value styling="" id="resource" path="."/>
                    </fb:simple-repeater>
                </meta:group>
            </meta:group>

But apparently the widget label is at the good position in the generated
file :

<fi:group>
<fi:label>Resources</fi:label>
<fi:styling layout="columns"/>
−
    <fi:items>
−
    <fi:group>
<fi:label>Resources</fi:label>
<fi:styling layout="columns"/>
−
    <fi:items>
−
    <fb:simple-repeater id="resources" parent-path="resources"
row-path="resource">
<ft:widget-label id="resource"/>
<ft:widget id="resource"/>
</fb:simple-repeater>
</fi:items>
</fi:group>
</fi:items>
</fi:group>

That's where i don't get the error message. It says "relative to the form
container" and "at unknown", which seems to mean that it doesn't know the
path.

Any idea ?

Marc

2006/4/5, Simone Gianni <s.gianni@thebug.it>:
>
> Hi Marc,
> the error is not (directly) related to definition or binding, but it's a
> template problem. In the template you have a <ft:widget-label
> id="resource"> which is not where it should be (AFAIU it should be a
> descendant of <ft:widget id="resources"/>).
>
> Hope this helps,
> Simone
>
> Marc Salvetti wrote:
>
> > Hello,
> >
> > i'm having trouble integrating a repeater in a form.
> > I copied the implementation made for Labels
> > The template, metabind and repository files look ok when i load them
> > trough the sample page, but when i try to display the form i get the
> > following :
> >
> > org.xml.sax.SAXException: Element 'widget-label' refers to unexistent
> > widget path 'resource', relative to the form container, at unknown
> >
> > Here is the metabind :
> >     <fb:context path="meta">
> >
> >         <meta:group
> >             styling-type="categories"
> >             label="General"
> >             state="internal-tab-state">
> >
> >             <meta:group styling-layout="columns" label="General">
> >                 <meta:new id="General"/>
> >                 <fb:value id="milestone" path="milestone"/>
> >                 <meta:new id="DurationDate"/>
> >                 <meta:new id="DurationTime"/>
> >
> >                 <fb:value id="assignee" path="assignee"/>
> >             </meta:group>
> >             <meta:group label="Resources" styling-layout="columns">
> >                 <meta:group label="Resources" styling-layout="columns">
> >                     <fb:simple-repeater id="resources"
> > parent-path="resources" row-path="resource">
> >                         <fb:value styling="" id="resource" path="."/>
> >                     </fb:simple-repeater>
> >                 </meta:group>
> >             </meta:group>
> >             <meta:new id="Alarm"/>
> >             <meta:new id="NewVersion"/>
> >             <meta:new id="System"/>
> >             <meta:new id="Versions"/>
> >         </meta:group>
> >     </fb:context>
> >
> > and the class where the repeater is defined :
> >
> >         <fd:class id="Task">
> >             <fd:widgets>
> >                 <fd:field id="title" required="true">
> >                     <fd:datatype base="string"/>
> >                 </fd:field>
> >                 <fd:field id="milestone">
> >                     <fd:datatype base="string"/>
> >                     <fd:selection-list
> >
> src="cocoon:/process-selection-list-specific?xpath=/document[meta/doctype='milestone']&amp;order=meta/title&amp;value=$doc/meta/id&amp;label=$doc/meta/title"
> > dynamic="true"/>
> >                 </fd:field>
> >                 <fd:field id="description" required="true">
> >                     <fd:datatype base="string"/>
> >                 </fd:field>
> >                 <fd:field id="assignee" required="true">
> >                     <fd:datatype base="string"/>
> >                     <fd:selection-list
> >
> src="cocoon:/process-selection-list-specific?xpath=/document[meta/doctype='contact']&amp;order=meta/lastname&amp;value=$doc/meta/id&amp;label=fn:string(fn:concat($doc/meta/firstname,'%20',$doc/meta/lastname))"
> > dynamic="true"/>
> >                 </fd:field>
> >                 <fd:repeater id="resources">
> >                     <fd:widgets>
> >                         <fd:field id="resource">
> >                             <fd:datatype base="string"/>
> >                             <fd:selection-list
> >
> src="cocoon:/process-selection-list-specific?xpath=/document[meta/doctype='resource']&amp;order=meta/title&amp;value=$doc/meta/id&amp;label=$doc/meta/title"
> > dynamic="true"/>
> >                         </fd:field>
> >                         <fd:booleanfield id="resources.select"/>
> >                     </fd:widgets>
> >                 </fd:repeater>
> >                 <fd:repeater-action
> >                     id="resources.action.add"
> >                     command="add-row"
> >                     repeater="resources"/>
> >                 <fd:repeater-action
> >                     id=" resources.action.remove"
> >                     command="delete-rows"
> >                     repeater="resources"
> >                     select="select"/>
> >             </fd:widgets>
> >         </fd:class>
> >
> >
> > Does someone have an idea of what i did wrong ?
> >
> > Thanks,
> >
> > Marc
>
> --
> Simone Gianni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Mime
View raw message