Make the button disabled with JavaScript after the first click, or
raise a flag at server side that it is clicked and all further clicks
should be ignored if the flag is true

On Fri, Jun 3, 2011 at 1:03 PM, Tier <vladimirsemas...@mail.ru> wrote:
> Hello,
>
> I have ModalWindow with form inside
>
> html:
>
> wicket:panel>
>        <form wicket:id="offerForm">
>           ...
>        <div class="confirm">
>         <wicket:message key="button.offer.reject" /> </p>
>        </div>
>        </form>
> </wicket:panel>
>
> java:
>
> add(okButton = new AjaxSubmitLink("closeOK", this)
>                {
>                        @Override
>                        protected void onSubmit(AjaxRequestTarget target, 
> Form<?> form)
>                        {
>                                save();
>                                window.close(target);
>                        }
>                });
>
> If I press button few times before it closes - it wicket will throw an
> exception
>
> org.apache.wicket.WicketRuntimeException: Submit Button closeOK
> (path=centralPanel:offerList:rejectOfferWindow:content:offerForm:closeOK) is
> not visible
>     at org.apache.wicket.markup.html.form.Form$2.component(Form.java:620)
>
> Any ideas how fix this problem?
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-in-ModalWindow-throws-Submit-Button-is-not-visible-exception-tp3570446p3570446.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to