Hi,

I think there is several ways to achieve that. You can, for instance, have
your own StaticButton class that extends button, then by using
#visitChildren(StaticButton.class) you get these back.
A warning however, not overriding onSubmit does not prevent the button (if
it's of type submit) to post the form to the server. Be sure your button is
of type "button".

Regards,
Sebastien.

On Thu, Nov 1, 2012 at 7:30 PM, eugenebalt <[email protected]> wrote:

> I appreciate the help so far.
>
> A somewhat unusual question: We need a way to identify all Buttons which
> don't go to the server for anything. Is there a way to identify these
> "client-side-only" Buttons?
>
> As an example, we have a Wicket Button constructed the usual way in our
> form, but its only action is to erase all fields on the form via JavaScript
> (it's a "Reset" button, has an onClick JS action). It doesn't go to the
> server and its activity is exclusively client-side.
>
> How can we check for these buttons in our code? Is it the fact that they
> don't override an onSubmit()?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-See-if-a-Button-Goes-To-the-Server-tp4653543.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to