It seems OK to me, although i'm not a Click expert/developer.
--
Lorenzo
On Nov 16, 2010, at 12:36 , Bob Schellink wrote:
> After pondering this awhile I'm starting to think we should drop the feature.
> The use case can be
> solved in a more direct way which doesn't raise the security concerns. For
> example:
>
> Submit submit = new Submit("done", this, "onSubmit");
>
> public void onInit() {
> // We want to check if submit was clicked in onInit, so we do an explicit
> bind
> ClickUtils.bind(submit);
>
> if( ! submit.isClicked()) {
> // If Submit was not Clicked (ie. a JS submit), switch off validation
> form.setValidate(false);
> }
>
> // onSubmit is only called if Submit was Clicked and validation is on
> public boolean onSubmit() {
> if(form.isValid() {
> // do stuff
> }
> }
>
> Thoughs?
>
> Kind regards
>
> Bob