yeah, we totally forgot that the dojo popup is actually closed via
javascript on the client and passing references around only on the server
doesn't help at all.
with some javascript foo, the actual call to close the popup form inside the
iframe would have to look something like that:
window.parent.dojo.widget.byId("popup2").hide();
you could achieve this by still passing the reference to Page2 and doing
this in the onEvent method:
protected void onEvent(AjaxRequestTarget target) {
target.prependJavascript("window.parent.dojo.widget.byId(\""
+ dojoPane.getMarkupId() + "\");");
}
hope it works this time ;)
Gerolf
On 9/19/07, Federico Fanton <[EMAIL PROTECTED]> wrote:
>
> On Tue, 18 Sep 2007 16:19:59 +0200
> "Gerolf Seitz" <[EMAIL PROTECTED]> wrote:
>
> > you could pass a reference to the dojofloatingpane to Page2
>
> I tried that, using it from a button inside Page2 like
>
> button.add(new AjaxEventBehavior("onclick"){
> protected void onEvent(AjaxRequestTarget target) {
> getCallingPopup().close(target);
> }
> });
>
> but when I press the button I get an error in "Wicket Ajax debug":
>
> INFO:<?xml version="1.0"
> encoding="UTF-8"?><ajax-response><evaluate><![CDATA[dojo.widget.byId('popup2').hide()]]></evaluate></ajax-response>
> INFO: Response parsed. Now invoking steps...
> ERROR: Exception evaluating javascript: ReferenceError: dojo is not
> defined
>
> So I figured I was missing Dojo's resources and I added:
>
> button.add(new AbstractDefaultDojoBehavior(){
> protected void respond(AjaxRequestTarget target) {}
> });
>
> but now I get the error
>
> INFO:<?xml version="1.0"
> encoding="UTF-8"?><ajax-response><evaluate><![CDATA[ dojo.widget.byId
> ('popup2').hide()]]></evaluate></ajax-response>
> INFO: Response parsed. Now invoking steps...
> ERROR: Exception evaluating javascript: TypeError: dojo.widget.byId("popup2")
> has no properties
>
> So, maybe it's impossible? :/ Or am I missing something?
>
> Thanks for your time again!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>