-igor
On 11/2/06,
Alex Parvulescu <[EMAIL PROTECTED]> wrote:
Thaks a lot,Igor!
it works very nice ;)
one thing:
the way it works for me
target.addJavascript("window.opener.location='"
+ urlFor(opener.getPageMap(), MyPage.class , null)
+ "'");
and I came upon a funny thing:
it's not enough to just close the popup window by _javascript_:
target.addJavascript("window.close();");
I need to refresh it so it will actually close
target.addJavascript("window.location.reload(true);");
I am on Ubuntu 6.06,but i think its a Firefox thing
Anyway,thanks again.
AlexOn 11/1/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:On 11/1/06, Alex Parvulescu < [EMAIL PROTECTED]> wrote:Hello,
I have a popup with a form.A simple ok/cancel thing.
are you using popupsettings? make sure you are doing new PopupSetings(PageMap.forName("mypopuppagemap")) so the popup page doesnt expire any pages out of the browser window that opened the popup.i have been doing some _javascript_ tricks,but the redirect is giving me some headaches.
you will have to be a bit more specific :)(this is for closing the current popup window,and refreshing the 'parent' window,so i can actually see what's been changed in the popup-form.)
add(new AjaxSubmitButton("submit", this) {
protected void onSubmit(AjaxRequestTarget target, Form form) {
target.addJavascript("window.opener.location.reload (true);");
target.addJavascript("window.close();");
target.addJavascript("window.location.reload(true);");
}
});
Any ideas?what i need to do is,if the user clicks ok - i need to redirect to a different page,else - on cancel - just close the popup.
class MyPopup extends Page {
MyPopup(final Page opener) {
...
add(new AjaxSubmitButton("submit", this) {
protected void onSubmit(AjaxRequestTarget target, Form form) {
target.addJavascript("window.close();");
// remove the popup from the pagemap since we are closing the window anyways
getPage().getPageMap().remove();
// go to the new page in the parent window
// the destination page must be created in the opener's pagemap
Page destination=new DestinationPage(opener.getPageMap());
target.addJavascript("window.location='"+urlFor(destination)+"');
}
});
maybe some changes in wicket so the popups would be controlled better,as i see it now,i have no controll over the parent page once the popup is closed,or 'closing'.
it depends on how thick a wrapper we want to make wicket around http. i think in this area it should be as thin as possible, like it is now, because this is getting into shady waters. there are a lot of things you might want to do and we are not really in the business of generating tons of different _javascript_.
i think it is easy enough to do what you want right now without the framework having to get involved. you were almost on the right track, just have to remember that you have to deal with different pagemaps when popping up windows.
-igorI am using wicket 1.2.1
Thanks,
Alex
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
