[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    AW: CForms Repeater problem
From:       Lamvik_Eldbjörg_(Applikations-Entwicklerin) <eldbjoerg.l
Date:       2006-06-08 11:07:35
Message-ID: ECB1ABDD85BE6744B213F475CDD939400A960E () mowmp005
[Download RAW message or body]


Hi again,
I tested your code in one of my existing forms and it worked - I could see all your 7 \
rows, so I didn't realise at first that this didn't work for you. I just discovered \
that you have forgotten to add the form-template tag (within the body), for example:  \
<ft:form-template action="#{$continuation/id}.continue" method="POST" ...>  \
</ft:form-template>

Does this solve your problem?

Regards,
Ellie

-----Ursprüngliche Nachricht-----
Von: Lamvik Eldbjörg (Applikations-Entwicklerin)
Gesendet: Donnerstag, 8. Juni 2006 10:58
An: 'users@cocoon.apache.org'
Betreff: AW: CForms Repeater problem


Hi,
I believe you want to add rows, right? Then you'll need to add an action widget like \
this:

definition file:
<fd:repeater-action id="addteammembers" command="add-row" repeater="enter-team">
  <fd:label>Add team-members</fd:label>
</fd:repeater-action>

template file:
<ft:widget id="addteammembers"/>

(See also http://cocoon.apache.org/2.1/userdocs/widgets/widget_action.html)

I have to admit that I can't use this approach myself yet, because this automatically \
creates a submit button, which clashes with my special onsubmit form validation. \
However, if you don't use onsubmit for anything else, it works - I've tried it out.

Regards,
Ellie

-----Ursprüngliche Nachricht-----
Von: christian bindeballe [mailto:ottosmops@gmail.com]
Gesendet: Mittwoch, 7. Juni 2006 18:44
An: users@cocoon.apache.org
Betreff: 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


Diese E-Mail beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte \
Inhalte. Sie ist ausschliesslich für die Empfänger bestimmt. Falls Sie nicht die als \
Empfänger bestimmte Person sind, sind Sie nicht berechtigt, die E-Mail oder Teile \
davon zu lesen, zu kopieren, weiterzuleiten oder anderweitig zu verwenden. Falls Sie \
diese E-Mail irrtümlicherweise erreicht hat, bitten wir Sie, diese sofort vollständig \
zu löschen und die absendende Person umgehend zu benachrichtigen. Die Mobiliar lehnt \
jegliche Haftung für Schäden im Zusammenhang mit dieser E-Mail ab. Die \
                E-Mail-Kommunikation mit der Mobiliar kann überwacht werden.
***
Le présent courriel peut contenir des informations confidentielles ou protégées par \
la loi. Il est destiné exclusivement au(x) destinataire (s)indiqué (s). Si vous \
n'êtes pas mentionné(e) en tant que destinataire, vous n'êtes pas en droit de lire \
tout ou partie du présent courriel, ni de le transmettre, ni d'en faire usage de \
quelque manière que ce soit. Aussi, si ce courriel vous est parvenu par erreur, nous \
vous prions de procéder dès à présent à sa suppression et d'en informer immédiatement \
la personne l'ayant expédié. La Mobilière décline toute responsabilité quant à \
d'éventuels dommages en liaison avec le présent courriel. La communication par \
courriel avec la Mobilière peut faire l'objet d'une surveillance.

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic