If you subclass ModalWindow you can add any constructor argument you like. alternatively you can set the modal on the component/page you use as content. That being said there is no reason why setModel followed by a getModel should throw a nullpointer. are you sure you are not accidentally invoking getModel before you had the chance to setModel?
Maurice On Mon, Apr 14, 2008 at 9:45 AM, Milan Křápek <[EMAIL PROTECTED]> wrote: > Hi, > please how can I pass the model to the modal window. I have my form in > modal window and I want to show there some default vaules that can be > changed. But I am not able to pass the model to the window. In constructor > there is not any parameter for model. I try to do this: > MyWindow.setModel(new Model(myObject)); > > and in the modal window I try to acces myModel with standatd procedure: > myObject) = ((MyObject)) getModel().getObject()); > > but this throws me NullPointerException. But I do not know why. When I set > the model I am sure that it has some value. > > Thanks for any advice > > Milan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
