Hi Jeffrey,

Due to the way pages are serialized models don't work right is shared between pages.

There are two kinds of modal windows and one of them is a page that is rendered on your page through an IFRAME.

If the model data is not appearing its because you are using the page type.

You will have to wire up the panel on the modal window to use a model that knows how to get the same object that is being used in the wizard step.

I've used a spring session scoped bean for this type of synchronization before. i.e. You create an IModel that loads and stores the object from the spring bean which will make the data the same in both the wizard step and the modal window.

Regards,

Mike


Passing a model between a page to modal window is the same as passing a model between pages
Ok.  How do I use the same model?  The model I have on step 1 if I pass
it into the modal window I get no data in the model.  This was my
original thought on how to do it but something isn't right.

And yes I know the wiki example refers to a "chooserPanel" and in my
case it is an "editorPanel".  I didn't expect the wiki to be the exact
code that I needed but a starting example.



-----Original Message-----
From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 7:03 AM
To: users@wicket.apache.org
Subject: Re: Showing Modal window within a wizard step

Hi Jeffrey, the wiki example refers to an "chooserPanel", that is not
the
case of your "editorPanel". Simple use the same model on step 1 on your
Modal window.

On Wed, Oct 7, 2009 at 5:19 PM, Jeffrey Schneller <
jeffrey.schnel...@envisa.com> wrote:

I am trying to show a modal window within a wizard step showing the
same
data the wizard step shows but as input text fields for editing.  I
have
found some references to showing a wizard in a modal window and
showing
a wizard within a wizard but not what I am looking to do.



I have the wizard steps appearing with the data and I have a modal
popup
being launched from the step via an AjaxLink.  I can't figure out how
to
get the data from the wizard step and make it appear in the modal as
well [so the user can edit the information].



I have a MyWizard object which in the constructor sets the default
model
to a CompoundPropertyModel of a LoadableDetachableModel of my data
object.  I then call a method in the constructor to set all the data
of
the model that I can from the database [which works].



The first step of the wizard shows any data that has been set in the
model.



How do I get my Modal window to show the same data from the model used
to display data  in step 1?



I then will need to take the values entered in the modal and push them
back into the wizard model.  I am assuming this can be done via an
entry
in the wiki [1].



Thanks.



[1]

http://cwiki.apache.org/WICKET/pass-form-input-from-modal-window-back-to
-the-caller-page.html<http://cwiki.apache.org/WICKET/pass-form-input-fro
m-modal-window-back-to%0A-the-caller-page.html>













Reply via email to