you can use an IAjaxCallDecorator to disable/hide the button before sending
the first ajax request.
i'm sure there is plenty to find in the archives...

  Gerolf

On Nov 13, 2007 6:59 PM, Federico Fanton <[EMAIL PROTECTED]> wrote:

> Hi everyone!
> I'm having a problem with an ajax button and I'd like to ask for help X-)
>
> I have a DataTable with a Button, a text field and a label on every row.
> My objective is to be able to insert data into the text field, then click on
> the button and have an ajax call which 1) renders the label according to the
> input and 2) hides the button.
> Everything is fine as long as I press the button a single time, but if (by
> accident) I doubleclick, I get an exception like:
>
> WicketMessage: component
> frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on page
> it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener interface =
> [RequestListenerInterface name=IBehaviorListener, method=public abstract
> void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>
> Root cause:
>
> org.apache.wicket.WicketRuntimeException: component
> frmDettaglio:dettaglio:tabella:rows:1:cells:1:cell:button not found on page
> it.ibc.moduli.movimenti.DettaglioMovimenti[id = 4], listener interface =
> [RequestListenerInterface name=IBehaviorListener, method=public abstract
> void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget
> (AbstractRequestCycleProcessor.java:394)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage
> (AbstractRequestCycleProcessor.java:440)
> at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(
> WebRequestCycleProcessor.java:139)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java
> :261)
> at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java
> :126)
>
>
> I think this is because there are two ajax calls, and since the first one
> alters the DOM (or maybe the serverside state - the button needs to be
> hidden) the second one can't find the "new" button anymore.. Is there a way
> to suppress one of the two calls?
>
> Many thanks for your attention!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to