I just noticed that autosizing ModalWindows has made it into Wicket 1.5, heres the JIRA: https://issues.apache.org/jira/secure/attachment/12456436/fix-WICKET-1.4.x.patch
Take a look at the patches, there is a method that sets the size of the window, might be something to borrow. cheers, Steve On 19/11/2010, at 8:52 AM, andrea del bene wrote: > Hi meduolis, > > in order to resize modal window you could try to use some JavaScript. Wicket > keeps track of modal window on client side with variable > Wicket.Window.current. To resize modal window you could write something like: > > var targetWindow = Wicket.Window.current.window; > var targetContent = Wicket.Window.current.content; > > targetContent.style.height = '120px'; > targetWindow.style.width = '200px'; > > You can run this script using appendJavascript method of ajax target. > Just remember that this script could not work with IE 6 (sigh!) and that the > actual window height is the sum of content height and caption height. You > coul access to caption's fields through variable Wicket.Window.current.caption > > Bye. > > > >> I have tried it already, but it does not help. >> >> on my panel I do this: >> >> >> modal.setInitialWidth(image.getWidth()); >> modal.setInitialHeight(image.getHeigth()); >> >> target.addComponent(modal); >> >> >> but on click nothing happens, no exceptions > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org