Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 1284 invoked from network); 5 Apr 2006 12:08:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Apr 2006 12:08:52 -0000 Received: (qmail 60637 invoked by uid 500); 5 Apr 2006 12:08:46 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 60598 invoked by uid 500); 5 Apr 2006 12:08:46 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 60586 invoked by uid 99); 5 Apr 2006 12:08:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 05:08:46 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of salvetti.marc@gmail.com designates 66.249.92.207 as permitted sender) Received: from [66.249.92.207] (HELO uproxy.gmail.com) (66.249.92.207) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 05:08:45 -0700 Received: by uproxy.gmail.com with SMTP id a2so851590ugf for ; Wed, 05 Apr 2006 05:08:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Z3vFNUWRyr8tQUdI7418O2tA/aP9blgp7eF8TAcvvfti5kXsHaO8YaK+7MM7k9UTrzPRJwt+vto3XxEWVyWfhnjH+DJAAu8mIwS5c0kroQPNX80oH5n1mlHrVhQ9WQg3tTF4fmgjJkk2zSZQVCMDI0sMRLRhu7RljYjAyNAnDVA= Received: by 10.78.20.13 with SMTP id 13mr154723hut; Wed, 05 Apr 2006 05:08:23 -0700 (PDT) Received: by 10.78.53.13 with HTTP; Wed, 5 Apr 2006 05:08:23 -0700 (PDT) Message-ID: <15786ae80604050508u90ccdc9h8d6f2b247b085786@mail.gmail.com> Date: Wed, 5 Apr 2006 19:08:23 +0700 From: "Marc Salvetti" To: users@cocoon.apache.org Subject: Re: Repeater in form In-Reply-To: <4433B25D.1080308@thebug.it> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5856_24907696.1144238903894" References: <15786ae80604050308v4103c3dfpfceafbe73c740cb0@mail.gmail.com> <4433A437.1050300@thebug.it> <15786ae80604050422j65103275v14aac3012cd10ab6@mail.gmail.com> <4433AFE5.3080202@thebug.it> <15786ae80604050458s637defepe1a8780496c35c56@mail.gmail.com> <4433B25D.1080308@thebug.it> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5856_24907696.1144238903894 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline Ok, thanks very much for this info. It's getting late here, so i'll try that tomorrow. Best regards, Marc 2006/4/5, Simone Gianni : > > Hi Marc, > I don't know how this framework works, but actually you should have in the > form template something like this : > > > > line of the repeater > > > > ... > > > OR : > > line of the repeater > > > > > But this last syntax is not AJAX compatible. > > Simone > > > Marc Salvetti wrote: > > Indeed it seems to be related, if i change to ft:repeater i don't have the > error, but still the repeater doesn't show up :( > > > > 2006/4/5, Simone Gianni < s.gianni@thebug.it>: > > > > Hi Marc, > > maybe I'm missing something, but in the generated file there is : > > > > > > > row-path="resource"> > > > > While it should be > > > Simone > > > > > > Marc Salvetti wrote: > > > > 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 : > > > > > > > > > parent-path="resources" row-path="resource"> > > > > > > > > > > > > But apparently the widget label is at the good position in the generated > > file : > > > > > > Resources > > > > − > > > > − > > > > Resources > > > > − > > > > − > > > row-path="resource"> > > > > > > > > > > > > > > > > > > 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 : > > > > > > Hi Marc, > > > the error is not (directly) related to definition or binding, but it's > > > a > > > template problem. In the template you have a > > id="resource"> which is not where it should be (AFAIU it should be a > > > descendant of ). > > > > > > 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 : > > > > > > > > > > > > > > > styling-type="categories" > > > > label="General" > > > > state="internal-tab-state"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > styling-layout="columns"> > > > > > > > parent-path="resources" row-path="resource"> > > > > > > path="."/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and the class where the repeater is defined : > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > src="cocoon:/process-selection-list-specific?xpath=/document[meta/doctype='milestone']&order=meta/title&value=$doc/meta/id&label=$doc/meta/title" > > > > > > > dynamic="true"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > src="cocoon:/process-selection-list-specific?xpath=/document[meta/doctype='contact']&order=meta/lastname&value=$doc/meta/id&label=fn:string(fn:concat($doc/meta/firstname,'%20',$doc/meta/lastname))" > > > > > > > dynamic="true"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > src="cocoon:/process-selection-list-specific?xpath=/document[meta/doctype='resource']&order=meta/title&value=$doc/meta/id&label=$doc/meta/title" > > > > > > > dynamic="true"/> > > > > > > > > > > > > > > > > > > > > > > > id="resources.action.add" > > > > command="add-row" > > > > repeater="resources"/> > > > > > > > id=" resources.action.remove" > > > > command="delete-rows" > > > > repeater="resources" > > > > select="select"/> > > > > > > > > > > > > > > > > > > > > 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 > > > > > > > > -- > > Simone Gianni > > > > -- > Simone Gianni > ------=_Part_5856_24907696.1144238903894 Content-Type: text/html; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Content-Disposition: inline Ok, thanks very much for this info.

It's getting late here, so i'll try that tomorrow.

Best regards,

Marc

2006/4/5, Simone Gianni < s.gianni@thebug.it>:
Hi Marc,
I don't know how this framework works, but actually you should have in the form template something like this :

<ft:repeater id="resources">
  <fi:group ... or other styling information for the repeater
  <ft:repeater-rows>
    <fi:group .. or other styling inromations to be repeated for every line of the repeater
    <ft:widget-label ... />
    <ft:widget ... />
  </ft:repeater-rows>
  ...
</ft:repeater>

OR :
 
  <ft:repeater-widget id="resources"
    <fi:group .. or other styling inromations to be repeated for every line of the repeater
    <ft:widget-label ... />
    <ft:widget ... />
  </ft:repeater-widget>

But this last syntax is not AJAX compatible.

Simone

 
Marc Salvetti wrote:
Indeed it seems to be related, if i change to ft:repeater i don't have the error, but still the repeater doesn't show up :(



2006/4/5, Simone Gianni < s.gianni@thebug.it>:
Hi Marc,
maybe I'm missing something, but in the generated file there is :


<fb:simple-repeater id="resources" parent-path="resources" row-path="resource">

While it should be <ft:repeater ..

Simone


Marc Salvetti wrote:
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


--
Simone Gianni

--
Simone Gianni

------=_Part_5856_24907696.1144238903894--