You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Luca Morandini <lu...@tin.it> on 2005/05/13 10:47:11 UTC
Endless loop in CForms when there's no submit widget: bug ?
Folks,
I've made a form without a submit widget, which resulted (after a while)
in a StackOverflowError... apparently the flow engine keep
auto-submitting the form over and over: is this a bug or is accepted
behaviour ?
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Endless loop in CForms when there's no submit widget: bug ?
Posted by Sylvain Wallez <sy...@apache.org>.
Luca Morandini wrote:
> Sylvain Wallez wrote:
>
>> Hmm... strange. A number of form samples have no explicit submit
>> widget and (seem to) work correctly.
>
>
> Ahem... ashamed to say my flowscript auto-loaded itself (I was
> cutting&pasting way too fast to notice), resulting in a really weird
> behaviour: by chance it worked when I added the submit widget and I
> jumped to the wrong conclusion :(
>
> Funny to notice sometimes it worked though :|
>
> So, if you want see something really weird, try writing a flowscript
> like this (name it "main.js"):
>
> cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
>
> cocoon.load("flow/main.js"); // It loads itself !
Wow, very cool :-)
I'm wondering how this could even start working!
> function showMap () {
> var frm;
>
> frm= new Form("cocoon:/fd-themes-legend.xml");
> frm.showForm("form-themes-legend.html");
> cocoon.sendPage("/message.html", null);
> }
>
> Sorry for wasting your time, Sylvian :(
No problem!
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: Endless loop in CForms when there's no submit widget: bug ?
Posted by Luca Morandini <lu...@tin.it>.
Sylvain Wallez wrote:
> Hmm... strange. A number of form samples have no explicit submit widget
> and (seem to) work correctly.
Ahem... ashamed to say my flowscript auto-loaded itself (I was
cutting&pasting way too fast to notice), resulting in a really weird
behaviour: by chance it worked when I added the submit widget and I
jumped to the wrong conclusion :(
Funny to notice sometimes it worked though :|
So, if you want see something really weird, try writing a flowscript
like this (name it "main.js"):
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
cocoon.load("flow/main.js"); // It loads itself !
function showMap () {
var frm;
frm= new Form("cocoon:/fd-themes-legend.xml");
frm.showForm("form-themes-legend.html");
cocoon.sendPage("/message.html", null);
}
Sorry for wasting your time, Sylvian :(
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Endless loop in CForms when there's no submit widget: bug ?
Posted by Sylvain Wallez <sy...@apache.org>.
Luca Morandini wrote:
> Folks,
>
> I've made a form without a submit widget, which resulted (after a
> while) in a StackOverflowError... apparently the flow engine keep
> auto-submitting the form over and over: is this a bug or is accepted
> behaviour ?
Hmm... strange. A number of form samples have no explicit submit widget
and (seem to) work correctly.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: Endless loop in CForms when there's no submit widget: bug ?
Posted by Luca Morandini <lu...@tin.it>.
Luca Morandini wrote:
> I've made a form without a submit widget, which resulted (after a while)
> in a StackOverflowError... apparently the flow engine keep
> auto-submitting the form over and over: is this a bug or is accepted
> behaviour ?
Hmm... seems the problem is more complex than just the absence of a
submit widget, I should investigate the matter further.
BTW, I'm using Cocoon 2.1.7
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------