cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Archie Cowan <archie.co...@gmail.com>
Subject Re: CForms button clicks verses enter in IE
Date Mon, 13 Feb 2006 15:54:08 GMT
On 2/9/06, Antonio Fiol BonnĂ­n <antonio.fiol@gmail.com> wrote:
>
>
>
> On the server, where you check whether the "next page" submit widget
> has been used (javaflow, flowscript,...), if "no widget" has been
> used, you can assume it's "next page", possibly unless you are on the
> last page, where it means "Finish".


I was able to get what I needed by doing this in a loop:

form.showForm("mypipeline");
if(form.getWidget().getSubmitWidget() != null) {
    // submit the form as usual
} else {
   // figure out what button the user wanted or show the form again
}

Thanks for the pointer.

For any developers listening, it'd be nice to have some default behavior in
the form class that figures out if the real submit button was used. Maybe a
toggleable exception so our flows can catch it and do something with it or
have the form not be submitted at all unless someone uses a button. Or
perhaps a configured default button in the model. So if a "default" button
was visible and there were no clicks on buttons to submit a form, the
"default" button's on-action could be called.

Just a thought. Thanks again.

Mime
View raw message