Hi

you are calling setResizable too late. When MyModalPage constructor is 
called, the window is already shown. You have to call setResizable (as 
well as the other methods) _before_ calling modalWindow.show().

-Matej

beboris wrote:
> We have the following code that attempts to create a modal window of certain
> size and make it non-resizable:
> 
> public class MyModalPage extends WebPage {
>       public MyModalPage( final WebPage parentPage, ModalWindow modalWindow) {
>               modalWindow.setVersioned(false);
>               modalWindow.setInitialWidth(400);
>               modalWindow.setInitialHeight(280);
>               modalWindow.setMinimalWidth(400);
>               modalWindow.setMinimalHeight(280);
>               modalWindow.setResizable(false);
>               ...
>       }
> }
> 
> public class ParentPage extends WebPage {
>     ...
>     private void addModalDialog() {
>         final ModalWindow modal;
>         add(modal = new ModalWindow("MyModalWindow"));
>         modal.setVersioned(false);
>         modal.setPageCreator(new ModalWindow.PageCreator() {
>               public Page createPage() {
>                   Page result = new MyModalPage(ParentPage.this,modal);
>                   return result;
>               }
>         }
>         ...
>     }
>     ...
> }
> 
> The modal window can be brought up upon a button click in the parent page.
> Unfortunately, when the modal window is displayed for the first time, it can
> be resized, despite modalWindow.setResizable(false) call. For subsequent
> button clicks it becomes non-resizable. Is there any way to make it
> non-resizable from the "get go" or is it a bug in the ModalWindow code?
> 
> Bob.
> 


-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to