Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem
just curious why do you want to extend it? what do you need?johanOn 11/14/06, Nili Adoram [EMAIL PROTECTED] wrote:In version 1.2.2 is it still cumbersome to extend PopupSettings.all fields are private (windowName, top, left etc.) with no getters, as well as flagToString().-- NiliEelco Hillenius wrote: I'm having trouble with porting this code into wicket. For the first time when one clicks the ... button, modal dialog comes up. For the following clicks, IE opens up both a new window and the modal dialog with the same contents. With FF it works as expected. I suspect, it has something to do with pagemaps or versioning, but how could I know, I'm new to wicket world. Please, help me. Could you try with the latest Wicket version from branch wicket-1.x? We just removed a redundant check for page maps that was a problem with frames; that might be a problem here too. BTW, in order to make a different _javascript_ code I copy-pasted entire content of PopupSettings and made a new getPopupSettings function. Is there other way around? Kind of the same, but you don't have to copy the whole class if you extend. This: PopupSettings popupSettings = new MyPopupSettings( PageMap.forName(popup)) { public String getPopupJavaScript() { // return your custom _javascript_ here } } Eelco - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://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=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem
replace the hard-coded window.open with window.showModalDialog or some other javascript method that determines the size and location of the popup relative to the opener. Johan Compagner wrote: just curious why do you want to extend it? what do you need? johan On 11/14/06, *Nili Adoram* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: In version 1.2.2 is it still cumbersome to extend PopupSettings. all fields are private (windowName, top, left etc.) with no getters, as well as flagToString(). -- Nili Eelco Hillenius wrote: I'm having trouble with porting this code into wicket. For the first time when one clicks the ... button, modal dialog comes up. For the following clicks, IE opens up both a new window and the modal dialog with the same contents. With FF it works as expected. I suspect, it has something to do with pagemaps or versioning, but how could I know, I'm new to wicket world. Please, help me. Could you try with the latest Wicket version from branch wicket-1.x? We just removed a redundant check for page maps that was a problem with frames; that might be a problem here too. BTW, in order to make a different javascript code I copy-pasted entire content of PopupSettings and made a new getPopupSettings function. Is there other way around? Kind of the same, but you don't have to copy the whole class if you extend. This: PopupSettings popupSettings = new MyPopupSettings( PageMap.forName(popup)) { public String getPopupJavaScript() { // return your custom javascript here } } Eelco - 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net 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=lnkkid=120709bid=263057dat=121642 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem
In version 1.2.2 is it still cumbersome to extend PopupSettings. all fields are private (windowName, top, left etc.) with no getters, as well as flagToString(). -- Nili Eelco Hillenius wrote: I'm having trouble with porting this code into wicket. For the first time when one clicks the ... button, modal dialog comes up. For the following clicks, IE opens up both a new window and the modal dialog with the same contents. With FF it works as expected. I suspect, it has something to do with pagemaps or versioning, but how could I know, I'm new to wicket world. Please, help me. Could you try with the latest Wicket version from branch wicket-1.x? We just removed a redundant check for page maps that was a problem with frames; that might be a problem here too. BTW, in order to make a different javascript code I copy-pasted entire content of PopupSettings and made a new getPopupSettings function. Is there other way around? Kind of the same, but you don't have to copy the whole class if you extend. This: PopupSettings popupSettings = new MyPopupSettings(PageMap.forName(popup)) { public String getPopupJavaScript() { // return your custom javascript here } } Eelco - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem
Should I provide some other forms of code in order to get help? No developer using wicket faced similar problem? Maybe my approach is not correct? Regards, shumbola All, I've got this simple use case: On compose e-mail page click on some button that shows list of users in modal window and after user chooses the the user(s), the modal window closes and compose page updated with the address of choosen user. Here is the simple html test case: --compose.html html head script var UserListRef = null; function ListUsers() { if(window.showModalDialog) //IE { window.showModalDialog(listusers.html, document, dialogHeight: 120px; dialogWidth: 400px; help: no; status: no) return false; } else //FF, did not test other browsers due to lack of those { if(UserListRef == null || UserListRef.closed) UserListRef = window.open(listusers.html, document, height=120px, width=400px, help=no, status=no, dialog=yes, modal=yes); else UserListRef.focus(); } } /script /head body input id=to_user type=text name=touser title=email value= input type=button value=... title=User list onclick=return ListUsers() /body /html --listusers.html html script /script script language=javascript function Close() { if(window.showModalDialog) //IE { n = dialogArguments.getElementById(to_user); n.value = document.getElementById(user).value; window.close(); } else //FF { var o = window.opener.document.getElementById((to_user)); o.value = document.getElementById(user).value; window.close(); } } /script body select id=user option value=[EMAIL PROTECTED] user1 /option option value=[EMAIL PROTECTED] user2 /option /select input type=button value=OK onclick=Close() /body /html Now, with static html files it works as expected, i.e., on ... button click we have modal window with list of users. jsp page with struts action works as expected, too. I'm having trouble with porting this code into wicket. For the first time when one clicks the ... button, modal dialog comes up. For the following clicks, IE opens up both a new window and the modal dialog with the same contents. With FF it works as expected. I suspect, it has something to do with pagemaps or versioning, but how could I know, I'm new to wicket world. Please, help me. Here are relevant wicket code: --Compose public class Compose extends MyAuthenticatedPage { public Compose() { add(new Label(message, here we will compose a new message)); PopupSettings popupSettings = new MyPopupSettings(PageMap.forName(popup)). setHeight(500).setWidth(500); Link listUsers = new PageLink(listUsers, ListUsers.class); listUsers.setPopupSettings(popupSettings); add(listUsers); } } --ListUsers public class ListUsers extends WebPage { public ListUsers() { } } --MyPopupSettings public class MyPopupSettings extends PopupSettings { same as in PopupSettings except the following public String getPopupJavaScript() { String windowTitle = windowName; if (windowTitle == null) { windowTitle = ; } else { // Fix for IE bug. windowTitle = windowTitle.replace(':', '_'); } StringBuffer script = new StringBuffer(if(window.showModalDialog) { window.showModalDialog(); script.append(target).append(, document, ); script.append('dialogHeight:120px; dialogWidth:400px; help:no; status:no'); ).append( return false; }); script.append( else { if(UserListRef == null || UserListRef.closed) UserListRef = window.open(); script.append(target).append(, document, ); script.append('height=120px, width=400px, help=no, status=no, dialog=yes, modal=yes'); script.append(); ).append( else UserListRef.focus();}); return script.toString(); } } BTW, in order to make a different javascript code I copy-pasted entire content of PopupSettings and made a new getPopupSettings function. Is there other way around? Thank you. Regards, shumbola - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list
[Wicket-user] wicket 1.2.1 and ModalDialog problem
All, I've got this simple use case: On compose e-mail page click on some button that shows list of users in modal window and after user chooses the the user(s), the modal window closes and compose page updated with the address of choosen user. Here is the simple html test case: --compose.html html head script var UserListRef = null; function ListUsers() { if(window.showModalDialog) //IE { window.showModalDialog(listusers.html, document, dialogHeight: 120px; dialogWidth: 400px; help: no; status: no) return false; } else //FF, did not test other browsers due to lack of those { if(UserListRef == null || UserListRef.closed) UserListRef = window.open(listusers.html, document, height=120px, width=400px, help=no, status=no, dialog=yes, modal=yes); else UserListRef.focus(); } } /script /head body input id=to_user type=text name=touser title=email value= input type=button value=... title=User list onclick=return ListUsers() /body /html --listusers.html html script /script script language=javascript function Close() { if(window.showModalDialog) //IE { n = dialogArguments.getElementById(to_user); n.value = document.getElementById(user).value; window.close(); } else //FF { var o = window.opener.document.getElementById((to_user)); o.value = document.getElementById(user).value; window.close(); } } /script body select id=user option value=[EMAIL PROTECTED] user1 /option option value=[EMAIL PROTECTED] user2 /option /select input type=button value=OK onclick=Close() /body /html Now, with static html files it works as expected, i.e., on ... button click we have modal window with list of users. jsp page with struts action works as expected, too. I'm having trouble with porting this code into wicket. For the first time when one clicks the ... button, modal dialog comes up. For the following clicks, IE opens up both a new window and the modal dialog with the same contents. With FF it works as expected. I suspect, it has something to do with pagemaps or versioning, but how could I know, I'm new to wicket world. Please, help me. Here are relevant wicket code: --Compose public class Compose extends MyAuthenticatedPage { public Compose() { add(new Label(message, here we will compose a new message)); PopupSettings popupSettings = new MyPopupSettings(PageMap.forName(popup)). setHeight(500).setWidth(500); Link listUsers = new PageLink(listUsers, ListUsers.class); listUsers.setPopupSettings(popupSettings); add(listUsers); } } --ListUsers public class ListUsers extends WebPage { public ListUsers() { } } --MyPopupSettings public class MyPopupSettings extends PopupSettings { ... same as in PopupSettings except the following public String getPopupJavaScript() { String windowTitle = windowName; if (windowTitle == null) { windowTitle = ; } else { // Fix for IE bug. windowTitle = windowTitle.replace(':', '_'); } StringBuffer script = new StringBuffer(if(window.showModalDialog) { window.showModalDialog(); script.append(target).append(, document, ); script.append('dialogHeight:120px; dialogWidth:400px; help:no; status:no'); ).append( return false; }); script.append( else { if(UserListRef == null || UserListRef.closed) UserListRef = window.open(); script.append(target).append(, document, ); script.append('height=120px, width=400px, help=no, status=no, dialog=yes, modal=yes'); script.append(); ).append( else UserListRef.focus();}); return script.toString(); } } BTW, in order to make a different javascript code I copy-pasted entire content of PopupSettings and made a new getPopupSettings function. Is there other way around? Thank you. Regards, shumbola - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user