Hi,

if you are inside an Ajax-Request you can simply do AjaxRequestTarget.get()

cheers
Hans


-----Ursprüngliche Nachricht-----
Von: Brian Mulholland [mailto:blmulholl...@gmail.com] 
Gesendet: Mittwoch, 18. April 2012 18:34
An: users@wicket.apache.org
Betreff: AbstractAjaxBehavior and ModalWindow

I have a page where I show a javascript widget.  Based on events in said
widget, I may fire one of five different ajax events.  On some of them, I am
required to show a modal window with a form in it.  I am using, based on
advice found while googling, AbstractAjaxBehavior to handle the ajax events,
which is working swell for the non-modal window events.  But ModalWindow
(the wicket extension) wants an AjaxRequestTarget passed to the show()
method.  Unlike the example which uses a link to trigger the modal window,
AbstractAjaxBehavior does not pass an AjaxRequestTarget for me to pass along
to the show() method.

I tried to pass along the request from the RequestCycle, but that got me the
following ClassCastException:
java.lang.ClassCastException:
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget
incompatible with org.apache.wicket.ajax.AjaxRequestTarget




Brian Mulholland

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



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

Reply via email to