You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by christian bindeballe <ot...@gmail.com> on 2006/06/07 18:43:40 UTC

CForms Repeater problem

Hi,

in the userdocs, I've read the description on how to include a repeater,
here is what I mean

http://cocoon.apache.org/2.1/userdocs/widgets/widget_repeater.html

I have tried both approaches (the one supporting Ajax as well as the
other), but neither time the repeater or any other part of the form will
show up. I don't seem to be able to see the forest for the trees, maybe
there is something wrong with my definition or template file. Could
someone please help me, this is what I have:

definition file:

<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
 <fd:widgets>
  <fd:repeater id="enter-team" initial-size="7">
   <fd:label>Teammitglieder eintragen</fd:label>
   <fd:widgets>
    <fd:field id="team_member-name" required="true">
     <fd:label id="Name"/>
     <fd:datatype base="string"/>
     <fd:initial-value>Vorname Name</fd:initial-value>
     <fd:validation>
      <fd:length min="2"/>
     </fd:validation>
    </fd:field>

    <fd:field id="team_member-contact" required="true">
     <fd:label id="E-Mail"/>
     <fd:datatype base="string"/>
     <fd:initial-value>E-Mail-Adresse</fd:initial-value>
     <fd:validation>
      <fd:email/>
     </fd:validation>
    </fd:field>
   </fd:widgets>
  </fd:repeater>

  <fd:field id="daily_scrum" required="false">
   <fd:label id="Daily Scrum"/>
   <fd:datatype base="string"/>
   <fd:initial-value>Raum, Zeit</fd:initial-value>
  </fd:field>
 </fd:widgets>
</fd:form>

template file:

<html xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
<jx:import
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
<head>
 <title>Weitere Details hinzufügen</title>
</head>
<body>
 <h3>Team</h3>
 <table>
  <tbody>
   <tr>fst row
    <th><ft:repeater-widget-label id="enter-team"
widget-id="team_member-name"/></th>
    <th><ft:repeater-widget-label id="enter-team"
widget-id="team_member-contact"/></th>
   </tr>
   <ft:repeater-widget id="enter-team">
    <tr>
     <td><ft:widget id="team_member-name"/></td>
     <td><ft:widget id="team_member-contact"/></td>
    </tr>
   </ft:repeater-widget>
  </tbody>
 </table>
</body>
</html>

In the template as above I will get output just unto "fst row". The
following HTML-tags will be included, too, but the widgets are not
transformed. Forms without repeater work fine.
Cocoon is 2.1.9

I have spent all day over this and I feel I get less able to see
anything the more I look at it. Any hints would be greatly appreciated.

Thanks in advance & sorry for all the code,

Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: CForms Repeater problem

Posted by Andreas Hochsteger <e9...@student.tuwien.ac.at>.
Hi,

the repeater syntax has changed slightly since Cocoon 2.1.8 as you will 
find on this page too:
http://cocoon.apache.org/2.1/userdocs/widgets/widget_repeater.html

HTH,
Andreas

christian bindeballe schrieb:
> Hi,
> 
> in the userdocs, I've read the description on how to include a repeater,
> here is what I mean
> 
> http://cocoon.apache.org/2.1/userdocs/widgets/widget_repeater.html
> 
> I have tried both approaches (the one supporting Ajax as well as the
> other), but neither time the repeater or any other part of the form will
> show up. I don't seem to be able to see the forest for the trees, maybe
> there is something wrong with my definition or template file. Could
> someone please help me, this is what I have:
> 
> definition file:
> 
> <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
>  <fd:widgets>
>   <fd:repeater id="enter-team" initial-size="7">
>    <fd:label>Teammitglieder eintragen</fd:label>
>    <fd:widgets>
>     <fd:field id="team_member-name" required="true">
>      <fd:label id="Name"/>
>      <fd:datatype base="string"/>
>      <fd:initial-value>Vorname Name</fd:initial-value>
>      <fd:validation>
>       <fd:length min="2"/>
>      </fd:validation>
>     </fd:field>
> 
>     <fd:field id="team_member-contact" required="true">
>      <fd:label id="E-Mail"/>
>      <fd:datatype base="string"/>
>      <fd:initial-value>E-Mail-Adresse</fd:initial-value>
>      <fd:validation>
>       <fd:email/>
>      </fd:validation>
>     </fd:field>
>    </fd:widgets>
>   </fd:repeater>
> 
>   <fd:field id="daily_scrum" required="false">
>    <fd:label id="Daily Scrum"/>
>    <fd:datatype base="string"/>
>    <fd:initial-value>Raum, Zeit</fd:initial-value>
>   </fd:field>
>  </fd:widgets>
> </fd:form>
> 
> template file:
> 
> <html xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
> xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
> xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
> <jx:import
> uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
> <head>
>  <title>Weitere Details hinzufügen</title>
> </head>
> <body>
>  <h3>Team</h3>
>  <table>
>   <tbody>
>    <tr>fst row
>     <th><ft:repeater-widget-label id="enter-team"
> widget-id="team_member-name"/></th>
>     <th><ft:repeater-widget-label id="enter-team"
> widget-id="team_member-contact"/></th>
>    </tr>
>    <ft:repeater-widget id="enter-team">
>     <tr>
>      <td><ft:widget id="team_member-name"/></td>
>      <td><ft:widget id="team_member-contact"/></td>
>     </tr>
>    </ft:repeater-widget>
>   </tbody>
>  </table>
> </body>
> </html>
> 
> In the template as above I will get output just unto "fst row". The
> following HTML-tags will be included, too, but the widgets are not
> transformed. Forms without repeater work fine.
> Cocoon is 2.1.9
> 
> I have spent all day over this and I feel I get less able to see
> anything the more I look at it. Any hints would be greatly appreciated.
> 
> Thanks in advance & sorry for all the code,
> 
> Christian
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org