RE: Showing Modal window within a wizard step
Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick with Wicket because I am at the point of no return on this project. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 4:01 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515 On Thu, Oct 8, 2009 at 2:32 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: We are using wicket to have clean html void of jsp tags. Because they cause maintenance problems as the sites evolve over time. Wicket was suggested as a possible solution for this. Which it is but the lack of decent documentation/examples of real world issues is getting to be an issue. -Original Message- From
Re: Showing Modal window within a wizard step
Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 9:09 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick with Wicket because I am at the point of no return on this project. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 4:01 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515
Re: Showing Modal window within a wizard step
I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.comwrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 9:09 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick
RE: Showing Modal window within a wizard step
Thanks for the example. It makes perfect sense now that I see it. I can even run the sample as its own project and see it working. Now, I took your example and put it into my project's codebase and the submit button in the modal panel does not cause the form to be submitted. Obviously I have something wrong with my code. Any ideas on why the submit button does not cause any code to fire. The ajax debugger is showing that my button is not returning any data. In the Ajax Debugger for my app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:2:irf:form:view:modalWindow:content:modifyPerson:save ::IActivePageBehaviorListener:0:1wicket:ignoreIfNotActive=truerandom=0 .6665615341811421 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (69 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response INFO: Response parsed. Now invoking steps... In the Ajax Debugger for the sample app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:0:wizard:form:view:modalWindow:content:form:submit::I ActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=0.3 515502192017532 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1985 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Modal Window/res/modal.js/script link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Moda lWindow/res/modal.css / /head]]/header-contributioncomponent id=view3 ![CDATA[div class=wicketExtensionsWizardViewInner id=view3 name: labelt/labelbr / description: labelt/labelbr / span id=modalWindow4 style=display:none div id=content5 style=display:none/div /spanbr / a id=showModal6 href=# onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:wizard:form:view:showModal::IB ehaviorListener:0:-1',null,null, function() {return Wicket.$('showModal6') != null;}.bind(this));return !wcall;show modal/a /div]]/componentevaluate![CDATA[var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == undefined || typeof(win.current) == undefined) { try { win = window.Wicket.Window; } catch (ignore) { } } if (typeof(win) != undefined typeof(win.current) != undefined) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); } try { close(window.parent); } catch (ignore) { close(window); }; }]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com
RE: Showing Modal window within a wizard step
The only difference I can see in the code is that I extend the wizard to be MyWizard and create the model, wizard model, and steps in the constructor. I then use MyWizard in the page rather than the generic Wizard. I don't think anything should be different because I extended the same Wizard that is used. So close, yet still so far from working -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 09, 2009 3:04 PM To: users@wicket.apache.org Subject: RE: Showing Modal window within a wizard step Thanks for the example. It makes perfect sense now that I see it. I can even run the sample as its own project and see it working. Now, I took your example and put it into my project's codebase and the submit button in the modal panel does not cause the form to be submitted. Obviously I have something wrong with my code. Any ideas on why the submit button does not cause any code to fire. The ajax debugger is showing that my button is not returning any data. In the Ajax Debugger for my app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:2:irf:form:view:modalWindow:content:modifyPerson:save ::IActivePageBehaviorListener:0:1wicket:ignoreIfNotActive=truerandom=0 .6665615341811421 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (69 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response INFO: Response parsed. Now invoking steps... In the Ajax Debugger for the sample app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:0:wizard:form:view:modalWindow:content:form:submit::I ActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=0.3 515502192017532 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1985 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Modal Window/res/modal.js/script link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Moda lWindow/res/modal.css / /head]]/header-contributioncomponent id=view3 ![CDATA[div class=wicketExtensionsWizardViewInner id=view3 name: labelt/labelbr / description: labelt/labelbr / span id=modalWindow4 style=display:none div id=content5 style=display:none/div /spanbr / a id=showModal6 href=# onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:wizard:form:view:showModal::IB ehaviorListener:0:-1',null,null, function() {return Wicket.$('showModal6') != null;}.bind(this));return !wcall;show modal/a /div]]/componentevaluate![CDATA[var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == undefined || typeof(win.current) == undefined) { try { win = window.Wicket.Window; } catch (ignore) { } } if (typeof(win) != undefined typeof(win.current) != undefined) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); } try { close(window.parent); } catch (ignore) { close(window); }; }]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Showing Modal window within a wizard step
I figured it out, the form is not submitting because of Required Field validations. I have a FeedbackPanel in the modal window panel. However the messages are not appearing in the feedback panel. If I change the fields to required in the example and add a FeedbackPanel the same thing happens. The messages are never shown. Ideas? -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 09, 2009 3:21 PM To: users@wicket.apache.org Subject: RE: Showing Modal window within a wizard step The only difference I can see in the code is that I extend the wizard to be MyWizard and create the model, wizard model, and steps in the constructor. I then use MyWizard in the page rather than the generic Wizard. I don't think anything should be different because I extended the same Wizard that is used. So close, yet still so far from working -Original Message- From: Jeffrey Schneller [mailto:jeffrey.schnel...@envisa.com] Sent: Friday, October 09, 2009 3:04 PM To: users@wicket.apache.org Subject: RE: Showing Modal window within a wizard step Thanks for the example. It makes perfect sense now that I see it. I can even run the sample as its own project and see it working. Now, I took your example and put it into my project's codebase and the submit button in the modal panel does not cause the form to be submitted. Obviously I have something wrong with my code. Any ideas on why the submit button does not cause any code to fire. The ajax debugger is showing that my button is not returning any data. In the Ajax Debugger for my app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:2:irf:form:view:modalWindow:content:modifyPerson:save ::IActivePageBehaviorListener:0:1wicket:ignoreIfNotActive=truerandom=0 .6665615341811421 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (69 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-response/ajax-response INFO: Response parsed. Now invoking steps... In the Ajax Debugger for the sample app I see: INFO: Initiating Ajax POST request on ?wicket:interface=:0:wizard:form:view:modalWindow:content:form:submit::I ActivePageBehaviorListener:0:-1wicket:ignoreIfNotActive=truerandom=0.3 515502192017532 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (1985 characters) INFO: ?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution encoding=wicket1 ![CDATA[head xmlns:wicket=http://wicket.apache.org;script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket -event.js/script script type=text/javascript src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js /script script type=text/javascript src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket -ajax-debug.js/script script type=text/javascript id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/ wicketAjaxDebugEnable=true; /*--]^]^*//script script type=text/javascript src=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Modal Window/res/modal.js/script link rel=stylesheet type=text/css href=resources/org.apache.wicket.extensions.ajax.markup.html.modal.Moda lWindow/res/modal.css / /head]]/header-contributioncomponent id=view3 ![CDATA[div class=wicketExtensionsWizardViewInner id=view3 name: labelt/labelbr / description: labelt/labelbr / span id=modalWindow4 style=display:none div id=content5 style=display:none/div /spanbr / a id=showModal6 href=# onclick=var wcall=wicketAjaxGet('?wicket:interface=:0:wizard:form:view:showModal::IB ehaviorListener:0:-1',null,null, function() {return Wicket.$('showModal6') != null;}.bind(this));return !wcall;show modal/a /div]]/componentevaluate![CDATA[var win; try { win = window.parent.Wicket.Window; } catch (ignore) { } if (typeof(win) == undefined || typeof(win.current) == undefined) { try { win = window.Wicket.Window; } catch (ignore) { } } if (typeof(win) != undefined typeof(win.current) != undefined) { var close = function(w) { w.setTimeout(function() { win.current.close(); }, 0); } try { close(window.parent); } catch (ignore) { close(window); }; }]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed
RE: Showing Modal window within a wizard step
I figured it out. I needed to have the feedback panel added back in the onError of the AjaxButton. Jeff From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Friday, October 09, 2009 1:15 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? It is just an wish for javadoc improvements, not the solution. Sending an example attached On Fri, Oct 9, 2009 at 1:49 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Sorry - typo on that step. The intent was that you use new Model(model.getObject()) to pull an object out of any potential loadable / detachable model that may be passed in. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Oct 9, 2009 at 9:09 AM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: Thank Jeremy. The LDM was causing the problem. It does make sense given your explanation. What do you intend with this code? public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } The Wizard can only accept an IWizardModel and not the model I am going to back it with. Unless I am completely twisted up. Did you intend this to be the WizardStep? How then can I get my modal popup to store the values entered into it when the user presses a save button and discard them and keep the values from the model in the WizardStep if the user presses cancel. Thanks. Jeff -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Thursday, October 08, 2009 11:03 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch
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.htmlhttp://cwiki.apache.org/WICKET/pass-form-input-from-modal-window-back-to%0A-the-caller-page.html -- Pedro Henrique Oliveira dos Santos
RE: Showing Modal window within a wizard step
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.htmlhttp://cwiki.apache.org/WICKET/pass-form-input-fro m-modal-window-back-to%0A-the-caller-page.html -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Showing Modal window within a wizard step
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.htmlhttp://cwiki.apache.org/WICKET/pass-form-input-fro m-modal-window-back-to%0A-the-caller-page.html
RE: Showing Modal window within a wizard step
I am using the modal window with a panel which sits inside a wizard. Here is my code because I am out of ideas and need a solution. The dropdown with the onchange is working and is updating the first name with the value from the selected object in the dropdown. The Popup is not getting the same data from the model. I keep getting first name being null even after the first name is shown correctly after choosing in the dropdown. I am using Guice. I am not using Spring and have no plans to use Spring. rant I like the Wicket framework but am becoming increasingly annoyed and losing faith in it. Easy things to develop are taking way too long and require more and more crap thrown at it to get it to work. I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. /rant That being said here is the code that I have. Hopefully someone can help me. STEP1 - extends WizardStep public Step1(String name, String summary, IModel model) { super(new Model(name), new Model(summary), model); final Label fname = new Label(name.firstName); fname.setOutputMarkupId(true); add(fname); add(new Label(name.middleName).setOutputMarkupId(true)); add(new Label(name.lastName).setOutputMarkupId(true)); add(new Label(adminName).setOutputMarkupId(true)); // Dropdown to choose a person if the account has more than one person tied to it List people = dao.findById(MySession.get().getAccountId()).getPeople(); DropDownChoice peopleSelect = new DropDownChoice(people, people, new PeopleChoiceRenderer(lastName, id)); peopleSelect.setRequired(true); peopleSelect.setNullValid(false); peopleSelect.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { RequestForm rf = (RequestForm) getDefaultModelObject(); if (rf.getPeople() != null) { rf.getName().setFirstName(rf.getPeople().getFirstName()); target.addComponent(fname); } } }); add(peopleSelect); final ModalWindow editPopup = new ModalWindow(modal); add(editPopup); final ModifyPeoplePanel editPopupPanel = new ModifyPeoplePanel(editPopup.getContentId(), model); editPopup.setContent(editPopupPanel); editPopup.setTitle(Modify People Info); editPopup.setCookieName(peopleModify); AjaxLink modifyLink = new AjaxLink(modify) { @Override public void onClick(AjaxRequestTarget target) { editPopup.show(target); } }; add(modifyLink); } MODIFYPEOPLEPANEL- class that extends panel public ModifyPeoplePanel(String id, IModel model) { super(id, model); Form form = new ModifyPeopleForm(modifyPeople, model); add(form); } public class ModifyPeopleForm extends Form { public ModifyPeopleForm(String id, IModel model) { super(id, model); add(new RequiredTextFieldString(name.firstName)); add(new RequiredTextFieldString(name.middleName)); add(new RequiredTextFieldString(name.lastName)); add(new RequiredTextFieldString(adminName)); } } -Original Message- From: Michael O'Cleirigh [mailto:michael.ocleir...@rivulet.ca] Sent: Thursday, October 08, 2009 11:00 AM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step 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
Re: Showing Modal window within a wizard step
I had an similar problem time ago. In my case a solve adding an submit bottom on bottom of the panel, that closes the modal window too. You have to chose a way to mantain your html form components on modal window in sync to they model on server. You can add on AjaxFormComponentUpdatingBehavior on onchange events too. Why? Because the panel object on browser will to be simple remove when you close the modal window. At that moment, you just lost you they input data without have sent it to server. I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. so why you are using wicket? On Thu, Oct 8, 2009 at 12:30 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am using the modal window with a panel which sits inside a wizard. Here is my code because I am out of ideas and need a solution. The dropdown with the onchange is working and is updating the first name with the value from the selected object in the dropdown. The Popup is not getting the same data from the model. I keep getting first name being null even after the first name is shown correctly after choosing in the dropdown. I am using Guice. I am not using Spring and have no plans to use Spring. rant I like the Wicket framework but am becoming increasingly annoyed and losing faith in it. Easy things to develop are taking way too long and require more and more crap thrown at it to get it to work. I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. /rant That being said here is the code that I have. Hopefully someone can help me. STEP1 - extends WizardStep public Step1(String name, String summary, IModel model) { super(new Model(name), new Model(summary), model); final Label fname = new Label(name.firstName); fname.setOutputMarkupId(true); add(fname); add(new Label(name.middleName).setOutputMarkupId(true)); add(new Label(name.lastName).setOutputMarkupId(true)); add(new Label(adminName).setOutputMarkupId(true)); // Dropdown to choose a person if the account has more than one person tied to it List people = dao.findById(MySession.get().getAccountId()).getPeople(); DropDownChoice peopleSelect = new DropDownChoice(people, people, new PeopleChoiceRenderer(lastName, id)); peopleSelect.setRequired(true); peopleSelect.setNullValid(false); peopleSelect.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { RequestForm rf = (RequestForm) getDefaultModelObject(); if (rf.getPeople() != null) { rf.getName().setFirstName(rf.getPeople().getFirstName()); target.addComponent(fname); } } }); add(peopleSelect); final ModalWindow editPopup = new ModalWindow(modal); add(editPopup); final ModifyPeoplePanel editPopupPanel = new ModifyPeoplePanel(editPopup.getContentId(), model); editPopup.setContent(editPopupPanel); editPopup.setTitle(Modify People Info); editPopup.setCookieName(peopleModify); AjaxLink modifyLink = new AjaxLink(modify) { @Override public void onClick(AjaxRequestTarget target) { editPopup.show(target); } }; add(modifyLink); } MODIFYPEOPLEPANEL- class that extends panel public ModifyPeoplePanel(String id, IModel model) { super(id, model); Form form = new ModifyPeopleForm(modifyPeople, model); add(form); } public class ModifyPeopleForm extends Form { public ModifyPeopleForm(String id, IModel model) { super(id, model); add(new RequiredTextFieldString(name.firstName)); add(new RequiredTextFieldString(name.middleName)); add(new RequiredTextFieldString(name.lastName)); add(new RequiredTextFieldString(adminName)); } } -Original Message- From: Michael O'Cleirigh [mailto:michael.ocleir...@rivulet.ca] Sent: Thursday, October 08, 2009 11:00 AM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step 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
Re: Showing Modal window within a wizard step
Ops, the modal window object on browser is created on 'document.body' level. Maybe you want to create an form to your ModifyPeoplePanel form components. On Thu, Oct 8, 2009 at 1:38 PM, Pedro Santos pedros...@gmail.com wrote: I had an similar problem time ago. In my case a solve adding an submit bottom on bottom of the panel, that closes the modal window too. You have to chose a way to mantain your html form components on modal window in sync to they model on server. You can add on AjaxFormComponentUpdatingBehavior on onchange events too. Why? Because the panel object on browser will to be simple remove when you close the modal window. At that moment, you just lost you they input data without have sent it to server. I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. so why you are using wicket? On Thu, Oct 8, 2009 at 12:30 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am using the modal window with a panel which sits inside a wizard. Here is my code because I am out of ideas and need a solution. The dropdown with the onchange is working and is updating the first name with the value from the selected object in the dropdown. The Popup is not getting the same data from the model. I keep getting first name being null even after the first name is shown correctly after choosing in the dropdown. I am using Guice. I am not using Spring and have no plans to use Spring. rant I like the Wicket framework but am becoming increasingly annoyed and losing faith in it. Easy things to develop are taking way too long and require more and more crap thrown at it to get it to work. I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. /rant That being said here is the code that I have. Hopefully someone can help me. STEP1 - extends WizardStep public Step1(String name, String summary, IModel model) { super(new Model(name), new Model(summary), model); final Label fname = new Label(name.firstName); fname.setOutputMarkupId(true); add(fname); add(new Label(name.middleName).setOutputMarkupId(true)); add(new Label(name.lastName).setOutputMarkupId(true)); add(new Label(adminName).setOutputMarkupId(true)); // Dropdown to choose a person if the account has more than one person tied to it List people = dao.findById(MySession.get().getAccountId()).getPeople(); DropDownChoice peopleSelect = new DropDownChoice(people, people, new PeopleChoiceRenderer(lastName, id)); peopleSelect.setRequired(true); peopleSelect.setNullValid(false); peopleSelect.add(new AjaxFormComponentUpdatingBehavior(onchange) { protected void onUpdate(AjaxRequestTarget target) { RequestForm rf = (RequestForm) getDefaultModelObject(); if (rf.getPeople() != null) { rf.getName().setFirstName(rf.getPeople().getFirstName()); target.addComponent(fname); } } }); add(peopleSelect); final ModalWindow editPopup = new ModalWindow(modal); add(editPopup); final ModifyPeoplePanel editPopupPanel = new ModifyPeoplePanel(editPopup.getContentId(), model); editPopup.setContent(editPopupPanel); editPopup.setTitle(Modify People Info); editPopup.setCookieName(peopleModify); AjaxLink modifyLink = new AjaxLink(modify) { @Override public void onClick(AjaxRequestTarget target) { editPopup.show(target); } }; add(modifyLink); } MODIFYPEOPLEPANEL- class that extends panel public ModifyPeoplePanel(String id, IModel model) { super(id, model); Form form = new ModifyPeopleForm(modifyPeople, model); add(form); } public class ModifyPeopleForm extends Form { public ModifyPeopleForm(String id, IModel model) { super(id, model); add(new RequiredTextFieldString(name.firstName)); add(new RequiredTextFieldString(name.middleName)); add(new RequiredTextFieldString(name.lastName)); add(new RequiredTextFieldString(adminName)); } } -Original Message- From: Michael O'Cleirigh [mailto:michael.ocleir...@rivulet.ca] Sent: Thursday, October 08, 2009 11:00 AM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step Hi Jeffrey, Due to the way pages are serialized models don't work right is shared between
RE: Showing Modal window within a wizard step
We are using wicket to have clean html void of jsp tags. Because they cause maintenance problems as the sites evolve over time. Wicket was suggested as a possible solution for this. Which it is but the lack of decent documentation/examples of real world issues is getting to be an issue. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 12:38 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. so why you are using wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Showing Modal window within a wizard step
I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515 On Thu, Oct 8, 2009 at 2:32 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: We are using wicket to have clean html void of jsp tags. Because they cause maintenance problems as the sites evolve over time. Wicket was suggested as a possible solution for this. Which it is but the lack of decent documentation/examples of real world issues is getting to be an issue. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 12:38 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. so why you are using wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos
RE: Showing Modal window within a wizard step
I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick with Wicket because I am at the point of no return on this project. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 4:01 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515 On Thu, Oct 8, 2009 at 2:32 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: We are using wicket to have clean html void of jsp tags. Because they cause maintenance problems as the sites evolve over time. Wicket was suggested as a possible solution for this. Which it is but the lack of decent documentation/examples of real world issues is getting to be an issue. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 12:38 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. so why you are using wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Showing Modal window within a wizard step
Jeff, Sorry I have not had time to read the entire post and that you have not found better documentation on this issue. However, your problem on this is almost certainly caused by the LoadableDetachableModel that is backing your CompoundPropertyModel in your wizard. Since a wizard is a multi-page process, you can not really use an LDM to back it unless you persist changes after every step. With an LDM (and not persisting changes at every step), you end up with something like this flow: WizardPageOne - load model from LDM (presumably DB) - display page with form - submit page - load model from LDM (presumably DB) - stick values onto model object - redirect to page two WizardPageTwo - load model from LDM (presumably DB) This is where the problem is - because those changes weren't persisted, the model was detached, and when page two was rendered, reloaded. The changes were lost. So, in your situation, substitute the modal window for page two - the changes weren't making it into the model object that was used in the modal. So, in any multi-page process, you either need to persist the changes back down to wherever the LDM is loading from, or simply remove the LDM when the wizard (or other multi-page process) is started, OR pass the model object directly onto the other steps. I find it easiest to do something similar to this: public MyWizard(IModelFoo model) { super(new Model(model.getObject())); } Since the model holds on to the actual object between requests, your changes stay on the model object without persisting to your data store between each request. This goes against the standard use of models where you want something to detach after every request, so it is counter-intuitive, but it is actually very similar in thought to most any framework - where you will need to hold a transient object in session during a multi-page process or persist a partially-completed model object to the data store on every request. Hope this helps! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Oct 8, 2009 at 3:43 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: I am completely lost. I have no idea what this means. How can the resolution to my problem be a JIRA issue that was created earlier today? To find out how to do something who would think to look in the issue tracking system which contains bugs and enhancement requests. Anyhow, I resolved my loading of the modal with data by ditching the LoadableDetachableModel for the time being and using a CompoundPropertyModel. I know it is not correct but it works for now. Now I am attempting to get the data back into the form that the modal is called from. You would think this is easy. But again I am stuck. Wizard WizardStep == data show is read only with a modify link which brings the modal up. Modal == shows the data as editable. Allows user to press submit button which closes window and updates the data in the WizardStep Please, any help with a simple real example will be appreciated. Pointing someone to a past post which may touch on the topic in the context of another question is not help. I am sure someone knows how to solve my issue. Thanks. PS: I need to stick with Wicket because I am at the point of no return on this project. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 4:01 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I disagree, at the moment a got this trouble, few minutes was necessary to I understand what was happening... any way: https://issues.apache.org/jira/browse/WICKET-2515 On Thu, Oct 8, 2009 at 2:32 PM, Jeffrey Schneller jeffrey.schnel...@envisa.com wrote: We are using wicket to have clean html void of jsp tags. Because they cause maintenance problems as the sites evolve over time. Wicket was suggested as a possible solution for this. Which it is but the lack of decent documentation/examples of real world issues is getting to be an issue. -Original Message- From: Pedro Santos [mailto:pedros...@gmail.com] Sent: Thursday, October 08, 2009 12:38 PM To: users@wicket.apache.org Subject: Re: Showing Modal window within a wizard step I have built multiple large sites with jsp/servlets/javascript/ajax that are 1000x more complex than what I am trying to do with less headaches. so why you are using wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org