Re: Dojo floating panel

2007-09-20 Thread Federico Fanton
On Wed, 19 Sep 2007 20:00:46 +0200
Gerolf Seitz [EMAIL PROTECTED] wrote:

 hope it works this time ;)

It works very well :) Many thanks for your time and patience!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dojo floating panel

2007-09-20 Thread Gerolf Seitz
sure, you're welcome

On 9/20/07, Federico Fanton [EMAIL PROTECTED] wrote:

 On Wed, 19 Sep 2007 20:00:46 +0200
 Gerolf Seitz [EMAIL PROTECTED] wrote:

  hope it works this time ;)

 It works very well :) Many thanks for your time and patience!


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Dojo floating panel

2007-09-19 Thread Gerolf Seitz
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-responseevaluate![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-responseevaluate![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]




Re: Dojo floating panel

2007-09-18 Thread Federico Fanton
On Mon, 17 Sep 2007 12:32:40 +0200
Federico Fanton [EMAIL PROTECTED] wrote:

  you can probably add an InlineFrame which loads the webpage to the
  DojoFloatingPane.
 
 Mmh.. What about communicating between the two pages (containing page and 
 panel) in such a situation? For example, could I pass user input from the 
 panel back to the page? Via the Session maybe?

The session works, but now I have another little problem.. X-)
I need to add a button to the iframe-d page which should close the 
DojoFloatingPane.. I tried with something like

button.add(new AjaxEventBehavior(onclick){
@Override
protected void onEvent(AjaxRequestTarget target) {
target.prependJavascript(window.close(););
}
});

but nothing happens, even though in Wicket ajax debug I can see that the 
window.close is returned..
Am I going the wrong way?
Many thanks in advance!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dojo floating panel

2007-09-18 Thread Gerolf Seitz

 button.add(new AjaxEventBehavior(onclick){
 @Override
 protected void onEvent(AjaxRequestTarget target) {
 target.prependJavascript(window.close(););
 }
 });

 but nothing happens, even though in Wicket ajax debug I can see that the
 window.close is returned..
 Am I going the wrong way?
 Many thanks in advance!


yes, that's the wrong way.

instead of target.prependJavascript(..); you should do the following:
myDojoFloatingPane.close(target);

hth,
  gerolf


-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Dojo floating panel

2007-09-18 Thread Federico Fanton
On Tue, 18 Sep 2007 15:09:40 +0200
Federico Fanton [EMAIL PROTECTED] wrote:

 I see, but since the closing button is *inside* an iframe, I don't have any 
 means to get myDojoFloatingPane (which is in the containing page).. Am I 
 wrong? ^^;

As a side note, maybe things would be simpler using a ModalWindow instead of 
Dojo? I didn't notice ModalWindow before.. :/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dojo floating panel

2007-09-18 Thread Gerolf Seitz
you could pass a reference to the dojofloatingpane to Page2

gerolf

On 9/18/07, Federico Fanton [EMAIL PROTECTED] wrote:

 On Tue, 18 Sep 2007 15:09:40 +0200
 Federico Fanton [EMAIL PROTECTED] wrote:

  I see, but since the closing button is *inside* an iframe, I don't have
 any means to get myDojoFloatingPane (which is in the containing page).. Am I
 wrong? ^^;

 As a side note, maybe things would be simpler using a ModalWindow instead
 of Dojo? I didn't notice ModalWindow before.. :/


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]