You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andreas Deininger <ad...@googlemail.com> on 2005/11/25 21:57:15 UTC

CForms error: Invalid submit id (no such widget)

Hi,

I coded a form using CForms. Inside this form is a repeater which
allows to add/delete rows. I invoke this form via the following line
inside an apple:

appleResponse.sendPage("Form-submission_form-Pipe", viewData);

Everything is working fine, I can insert and delete arbitrary rows of
my repeater element.

If I display the same form (same definition / template / pipeline) via
a javascript flowscript, the form shows up correctly, showing a single
row of my repeater element. Adding a second row works, too. However,
if I try to add a third row, I get the error message:

Error calling flowscript function submission
Invalid submit id (no such widget): authors.1.add

Any ideas what might cause that error?

Thanks in advance
Andreas

BTW, I compiled my Cocoon from cocoon-BRANCH_2_1_X_20051029103845.tar.gz

Here is the definition of my form:

    <fd:repeater id="authors" initial-size="1" min-size="1" max-size="10" >
      <fd:widgets>
        <fd:output id="id">
          <fd:datatype base="long" />
        </fd:output>
        <fd:field id="author" required="true">
          <fd:label>Autor</fd:label>
          <fd:datatype base="string"/>
        </fd:field>
        <fd:field id="institution" required="true">
          <fd:label>Institution</fd:label>
          <fd:datatype base="string"/>
        </fd:field>
        <fd:row-action id="add" command="add-after">
          <fd:label><i18n:text key="submit.links.add"/></fd:label>
        </fd:row-action>
        <fd:row-action id="delete" command="delete">
          <fd:label><i18n:text key="submit.links.delete"/></fd:label>
        </fd:row-action>
        <fd:row-action id="moveUp" command="move-up">
          <fd:label><i18n:text key="submit.links.move-up"/></fd:label>
        </fd:row-action>
        <fd:row-action id="moveDown" command="move-down">
          <fd:label><i18n:text key="submit.links.move-down"/></fd:label>
        </fd:row-action>
      </fd:widgets>
    </fd:repeater>

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


Re: CForms error: Invalid submit id (no such widget)

Posted by Sylvain Wallez <sy...@apache.org>.
Joerg Heinicke wrote:
> On 27.11.2005 15:24, Andreas Deininger wrote:
>
>> Since I'm considering an upgrade to 2.1.8 I would like to ask whether
>> the bug you mentioned is fixed in 2.1.8 already? Or in SVN only?
>
> Unfortunately only in SVN as Sylvain fixed the bug just a few minutes ago.

Yup. You must add the latest Form.java from SVN to 2.1.8

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


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


Re: CForms error: Invalid submit id (no such widget)

Posted by Joerg Heinicke <jo...@gmx.de>.
On 27.11.2005 15:24, Andreas Deininger wrote:

> Since I'm considering an upgrade to 2.1.8 I would like to ask whether
> the bug you mentioned is fixed in 2.1.8 already? Or in SVN only?

Unfortunately only in SVN as Sylvain fixed the bug just a few minutes ago.

Jörg

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


Re: CForms error: Invalid submit id (no such widget)

Posted by Andreas Deininger <ad...@googlemail.com>.
Sylvain,

thanks for the info!
Since I'm considering an upgrade to 2.1.8 I would like to ask whether
the bug you mentioned is fixed in 2.1.8 already? Or in SVN only?

TIA
Andreas

2005/11/27, Sylvain Wallez <sy...@apache.org>:
> Andreas Deininger wrote:
> > Hi,
> >
> > I coded a form using CForms. Inside this form is a repeater which
> > allows to add/delete rows. I invoke this form via the following line
> > inside an apple:
> >
> > appleResponse.sendPage("Form-submission_form-Pipe", viewData);
> >
> > Everything is working fine, I can insert and delete arbitrary rows of
> > my repeater element.
> >
> > If I display the same form (same definition / template / pipeline) via
> > a javascript flowscript, the form shows up correctly, showing a single
> > row of my repeater element. Adding a second row works, too. However,
> > if I try to add a third row, I get the error message:
> >
> > Error calling flowscript function submission
> > Invalid submit id (no such widget): authors.1.add
> >
> > Any ideas what might cause that error?
> >
>
> I found a bug that occurs when a row-action is used in a stateless
> application: the submit widget was checked _before_ the request was
> processed, and this is this processing that recreates the rows according
> to the value sent by <ft:repeater-size>.
>
> This is fixed now. You may want to update at least Form.java and try again.
>
> Sylvain

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


Re: CForms error: Invalid submit id (no such widget)

Posted by Sylvain Wallez <sy...@apache.org>.
Andreas Deininger wrote:
> Hi,
>
> I coded a form using CForms. Inside this form is a repeater which
> allows to add/delete rows. I invoke this form via the following line
> inside an apple:
>
> appleResponse.sendPage("Form-submission_form-Pipe", viewData);
>
> Everything is working fine, I can insert and delete arbitrary rows of
> my repeater element.
>
> If I display the same form (same definition / template / pipeline) via
> a javascript flowscript, the form shows up correctly, showing a single
> row of my repeater element. Adding a second row works, too. However,
> if I try to add a third row, I get the error message:
>
> Error calling flowscript function submission
> Invalid submit id (no such widget): authors.1.add
>
> Any ideas what might cause that error?
>   

I found a bug that occurs when a row-action is used in a stateless 
application: the submit widget was checked _before_ the request was 
processed, and this is this processing that recreates the rows according 
to the value sent by <ft:repeater-size>.

This is fixed now. You may want to update at least Form.java and try again.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


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