You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2009/06/19 22:37:21 UTC

Re: button-tag submitting a form?

<button type="submit">delete</button>

-igor

On Fri, Jun 19, 2009 at 2:17 PM, <ra...@pixotec.de> wrote:
> I try to submit a form using a button-tag (<button type="button"></button>).
> "deleteButton" does not work: as SubmitLink (inside Form), as AjaxButton (inside/outside), as Button (inside)... (tried them all)
>
> (I want to use the html-button-tag because of having nice icon and text under icon...)
>
> HTML (AjaxButton should work even when outside form):
> <button type="button" wicket:id="deleteButton"><img src="images/btn-delete.png"><br>Delete</button>
> <form wicket:id="inputForm">
> ...
> </form>
>
> Java:
> add(new AjaxButton("deleteButton", inputForm) {
>  public void onSubmit(AjaxRequestTarget target, Form form) {
>    System.out.println("success!!!");
>  }
> });
>
> There is never "success!!!" printed... ;-(
>
> HOW?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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