Re: link within modal window should reload parent page

2011-04-13 Thread hrbaer


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3447299.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



Re: link within modal window should reload parent page

2011-04-13 Thread hrbaer

MZemeck wrote:
 The only thing that comes to mind is storing a flag in session. 
That is the approach I already implemented but with the same discomfiture
you mentioned before.

Meanwhile I tried to add the embedded javascript but without any success
yet.
I added the code both to my modalpage.html and the parent page .html. Do I
have to add any information's to the link or anything else??

--
2. or embed javascipt to base page:

  
--

Thanks in advance.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3447308.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



Re: link within modal window should reload parent page

2011-04-12 Thread MZemeck
The only thing that comes to mind is storing a flag in session.  Or 
perhaps if you are updating you datastore when the link is clicked you 
could check there.  Not the best solution in my mind, if you find 
something else let me know...




From:   hrbaer herber.m...@gmail.com
To: users@wicket.apache.org
Date:   04/11/2011 05:03 PM
Subject:Re: link within modal window should reload parent page



ok - I just realised that the WindowCloseCallback method gets triggered if 
a
user clicks on the link but also if he wants to close the popup. That's 
not
that good :(
Is there a chance to differ whether the user uses the link or just click 
on
the x button to close the popup?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3443126.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






Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

Re: link within modal window should reload parent page

2011-04-11 Thread hrbaer
Thanks for the hint but the behaviour is still present.

I added your code to both ModalPage and parent Webpage but the popup still
appears.
Any idea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3441529.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



Re: link within modal window should reload parent page

2011-04-11 Thread MZemeck
How about using setResponsePage in ModalWindow.WindowClosedCallback() or 
ModalWindow.CloseButtonCallback()?

Does modalwindow.close(target); fire CloseButtonCallback?
 




From:   hrbaer herber.m...@gmail.com
To: users@wicket.apache.org
Date:   04/11/2011 06:03 AM
Subject:Re: link within modal window should reload parent page



Thanks for the hint but the behaviour is still present.

I added your code to both ModalPage and parent Webpage but the popup still
appears.
Any idea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3441529.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






Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

Re: link within modal window should reload parent page

2011-04-11 Thread hrbaer
It does!
I didn't expect that the modalwindow.close( target ); triggers the
WindowClosedCallback function.

Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3443067.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



Re: link within modal window should reload parent page

2011-04-11 Thread hrbaer
ok - I just realised that the WindowCloseCallback method gets triggered if a
user clicks on the link but also if he wants to close the popup. That's not
that good :(
Is there a chance to differ whether the user uses the link or just click on
the x button to close the popup?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3443126.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



Re: link within modal window should reload parent page

2011-04-10 Thread Martin Grigorov
since you use a page for the modal you need to call window.location for
the parent window:
parent.location= ...the url here ...
or
top.location = ... the url here ...

On Sat, Apr 9, 2011 at 3:07 PM, hrbaer herber.m...@gmail.com wrote:

 I tried to add a AjaxLink but I didn't get it so far.
 This is my code:

 public class ModalPage extends WebPage{

public ModalPage( final ModalWindow modalwindow ){

add( new AjaxLink( link ) {

public void onClick( final AjaxRequestTarget target ) {

modalwindow.close( target );
 target.appendJavascript(window.location=' + urlFor(
 Home.class, new PageParameters() ) + ');

}

});

}

 }

 The current effect: The modal windows get's closed but no redirect took
 place.
 Any idea?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3438418.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 http://jweekend.com/


Re: link within modal window should reload parent page

2011-04-10 Thread hrbaer
Ok, thanks. This is working.
But if a user clicks on the link within the modal page a confirmation dialog
pops up.

http://apache-wicket.1842946.n4.nabble.com/file/n3439885/dialog.jpg 
(It's about a warning message for the user if he want's to leave the page
(because of the redirect)).

Would assume that is a functionality of the browser, isn't it?
Any chance to avoid that pop up?


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3439885.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



Re: link within modal window should reload parent page

2011-04-10 Thread robert.mcguinness
if I remember correctly:

 public void renderHead(IHeaderResponse response) {
response.renderOnDomReadyJavascript(if (typeof Wicket != 'undefined' 
Wicket.Window) Wicket.Window.unloadConfirmation = false;);

  }

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3440115.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



Re: link within modal window should reload parent page

2011-04-09 Thread Alexander Morozov
1. use AjaxLink

AjaxLink redirectLink = new AjaxLink(...) {
  
  public void onClick(AjaxRequestTarget target) {
ModalWindow.closeCurrent(target);
target.appendJavascript(window.location=' + urlFor(AnotherPage.class)
+ ');
  } 

};

2. or embed javascipt to base page:
  



-
--
http://www.linkedin.com/in/amorozov
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3438009.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



Re: link within modal window should reload parent page

2011-04-09 Thread hrbaer
I tried to add a AjaxLink but I didn't get it so far.
This is my code:

public class ModalPage extends WebPage{

public ModalPage( final ModalWindow modalwindow ){

add( new AjaxLink( link ) {

public void onClick( final AjaxRequestTarget target ) {

modalwindow.close( target );
target.appendJavascript(window.location=' + urlFor(
Home.class, new PageParameters() ) + '); 

}

});

}

}

The current effect: The modal windows get's closed but no redirect took
place.
Any idea?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/link-within-modal-window-should-reload-parent-page-tp3437508p3438418.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