You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Omar Adobati <om...@gmail.com> on 2005/11/16 22:38:09 UTC
Form Description, Form Template & Repeater
Hello Cocooners,
here is a sample of the code I'm trying to write:
1. the form definition
<fd:repeater id="TelNumbers">
<fd:widgets>
<fd:field id="Type">
<fd:label>type</fd:label>
<fd:datatype base="long"/>
</fd:field>
<fd:field id="Value">
<fd:label>tel Number</fd:label>
<fd:datatype base="string"/>
</fd:field>
</fd:widgets>
</fd:repeater>
2. the form template
<ft:repeater id="TelNumbers" initial-size="2">
<tr>
<td>
<ft:repeater-widget-label widget-id="Type"/>
</td>
<td>
<ft:widget id="Type"/>
</td>
</tr>
<tr>
<td>
<ft:repeater-widget-label widget-id="Value"/>
</td>
<td>
<ft:widget id="Value"/>
</td>
</tr>
</ft:repeater>
and here is the error cocoon gives me back:
org.apache.cocoon.forms.FormsRuntimeException: Repeater 'TelNumbers'
has no child named 'Type'
fd:repeater - file:/C:/Programmi/Apache%20Software%20Foundation/Tomcat%205.5/webapps/cocoon/CFormTest/forms/employee.xml
- 97:38
where is the problem?
tanks again for your helps
--
Omar Adobati
omar.adobati@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form Description, Form Template & Repeater
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 17, 2005, at 10:11 AM, Omar Adobati wrote:
> but I have an error that sounds quit like the one I have before:
> Repeater 'TelNumbers' has no child named 'TelNumbers'
Have you tried commenting out the <ft:widget-label> elements, just to
make sure it's just those that are the problem?
I'm guessing here but I think that inside the repeater you just want
the attribute to be "id", not "widget-id".
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form Description, Form Template & Repeater
Posted by Omar Adobati <om...@gmail.com>.
Tanks Bruno
for your suggestions but I solved the problem (I hope in the right
way) 10 hours ago before your e-mail.
Here is the code I wrote (the only difference is that now is in
Italian, but I think it's not a matter):
<ft:repeater id="NumeriTelefono">
<ft:repeater-rows>
<tr class="casa">
<td>
<ft:widget-label id="IDTipo"/>
</td>
<td>
<ft:widget id="IDTipo"/>
</td>
</tr>
<tr class="ufficio">
<td>
<ft:widget-label id="Valore"/>
</td>
<td>
<ft:widget id="Valore"/>
</td>
</tr>
</ft:repeater-rows>
</ft:repeater>
Is this right now?
On 11/18/05, Bruno Dumon <br...@outerthought.org> wrote:
> On Thu, 2005-11-17 at 19:11 +0100, Omar Adobati wrote:
> > Thanks for the answers, I changed the code in:
> >
> > <ft:repeater id="TelNumbers" initial-size="2">
> > <tr>
> > <td>
> > <ft:widget-label widget-id="Type"/>
> > </td>
> > <td>
> > <ft:widget id="Type"/>
> > </td>
> > </tr>
> > <tr>
> > <td>
> > <ft:widget-label widget-id="Value"/>
> > </td>
> > <td>
> > <ft:widget id="Value"/>
> > </td>
> > </tr>
> > </ft:repeater>
> >
> > but I have an error that sounds quit like the one I have before:
> > Repeater 'TelNumbers' has no child named 'TelNumbers'
> >
> > why?
>
> Hmm... I get the impression that you're just randomly trying out tags
> without understanding what they do.
>
> Have a look at the example here (below the header "From Cocoon 2.1.8"):
> http://cocoon.apache.org/2.1/userdocs/widgets/widget_repeater.html
>
> Thus:
> 1. your code is missing the ft:repeater-rows tag.
> 2. if you want to insert the widget labels inside each row, then you
> need to do the usual <ft:widget-label id="..."/>
>
> >
> >
> > On 11/17/05, Myriam Delperier <my...@ajlsm.com> wrote:
> > > | | hello,
> > > | | I think that in the template :
> > > | | <ft:repeater-widget-label widget-id="Type"/> should be replaced by
> > > | | <ft:widget-label widget-id="Type"/>,
> > > | | same thing for <ft:repeater-widget-label widget-id="Value"/>.
> > >
> > > in fact the good value is : <ft:widget-label id="Type"/>
> > >
>
> --
> Bruno Dumon http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> bruno@outerthought.org bruno@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
Dr. Omar Adobati
omar.adobati@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form Description, Form Template & Repeater
Posted by Bruno Dumon <br...@outerthought.org>.
On Thu, 2005-11-17 at 19:11 +0100, Omar Adobati wrote:
> Thanks for the answers, I changed the code in:
>
> <ft:repeater id="TelNumbers" initial-size="2">
> <tr>
> <td>
> <ft:widget-label widget-id="Type"/>
> </td>
> <td>
> <ft:widget id="Type"/>
> </td>
> </tr>
> <tr>
> <td>
> <ft:widget-label widget-id="Value"/>
> </td>
> <td>
> <ft:widget id="Value"/>
> </td>
> </tr>
> </ft:repeater>
>
> but I have an error that sounds quit like the one I have before:
> Repeater 'TelNumbers' has no child named 'TelNumbers'
>
> why?
Hmm... I get the impression that you're just randomly trying out tags
without understanding what they do.
Have a look at the example here (below the header "From Cocoon 2.1.8"):
http://cocoon.apache.org/2.1/userdocs/widgets/widget_repeater.html
Thus:
1. your code is missing the ft:repeater-rows tag.
2. if you want to insert the widget labels inside each row, then you
need to do the usual <ft:widget-label id="..."/>
>
>
> On 11/17/05, Myriam Delperier <my...@ajlsm.com> wrote:
> > | | hello,
> > | | I think that in the template :
> > | | <ft:repeater-widget-label widget-id="Type"/> should be replaced by
> > | | <ft:widget-label widget-id="Type"/>,
> > | | same thing for <ft:repeater-widget-label widget-id="Value"/>.
> >
> > in fact the good value is : <ft:widget-label id="Type"/>
> >
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form Description, Form Template & Repeater
Posted by Omar Adobati <om...@gmail.com>.
Thanks for the answers, I changed the code in:
<ft:repeater id="TelNumbers" initial-size="2">
<tr>
<td>
<ft:widget-label widget-id="Type"/>
</td>
<td>
<ft:widget id="Type"/>
</td>
</tr>
<tr>
<td>
<ft:widget-label widget-id="Value"/>
</td>
<td>
<ft:widget id="Value"/>
</td>
</tr>
</ft:repeater>
but I have an error that sounds quit like the one I have before:
Repeater 'TelNumbers' has no child named 'TelNumbers'
why?
On 11/17/05, Myriam Delperier <my...@ajlsm.com> wrote:
> | | hello,
> | | I think that in the template :
> | | <ft:repeater-widget-label widget-id="Type"/> should be replaced by
> | | <ft:widget-label widget-id="Type"/>,
> | | same thing for <ft:repeater-widget-label widget-id="Value"/>.
>
> in fact the good value is : <ft:widget-label id="Type"/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
--
Omar Adobati
omar.adobati@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form Description, Form Template & Repeater
Posted by Myriam Delperier <my...@ajlsm.com>.
| | hello,
| | I think that in the template :
| | <ft:repeater-widget-label widget-id="Type"/> should be replaced by
| | <ft:widget-label widget-id="Type"/>,
| | same thing for <ft:repeater-widget-label widget-id="Value"/>.
in fact the good value is : <ft:widget-label id="Type"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form Description, Form Template & Repeater
Posted by Myriam Delperier <my...@ajlsm.com>.
Omar Adobati wrote:
| Hello Cocooners,
|
| here is a sample of the code I'm trying to write:
|
| 1. the form definition
| <fd:repeater id="TelNumbers">
| <fd:widgets>
| <fd:field id="Type">
| <fd:label>type</fd:label>
| <fd:datatype base="long"/>
| </fd:field>
| <fd:field id="Value">
| <fd:label>tel Number</fd:label>
| <fd:datatype base="string"/>
| </fd:field>
| </fd:widgets>
| </fd:repeater>
|
| 2. the form template
| <ft:repeater id="TelNumbers" initial-size="2">
| <tr>
| <td>
| <ft:repeater-widget-label widget-id="Type"/>
| </td>
| <td>
| <ft:widget id="Type"/>
| </td>
| </tr>
| <tr>
| <td>
| <ft:repeater-widget-label widget-id="Value"/>
| </td>
| <td>
| <ft:widget id="Value"/>
| </td>
| </tr>
| </ft:repeater>
|
| and here is the error cocoon gives me back:
|
| org.apache.cocoon.forms.FormsRuntimeException: Repeater 'TelNumbers'
| has no child named 'Type'
| fd:repeater -
|
file:/C:/Programmi/Apache%20Software%20Foundation/Tomcat%205.5/webapps/cocoon/CFormTest/forms/employee.xml
| - 97:38
|
| where is the problem?
hello,
I think that in the template :
<ft:repeater-widget-label widget-id="Type"/> should be replaced by
<ft:widget-label widget-id="Type"/>,
same thing for <ft:repeater-widget-label widget-id="Value"/>.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org