Re: Refresh ModalWindow - Impossible??
Hi! Did not quite get the big picture. But, I have experienced problems when synchronizing between two different pages because Wicket seems to serialize-deserialize the session - object references change. I was debugging this for quite a while as the underlaying page was updating models that remained only original copies of the ones in the session (and used by the popup-page). My solution was to make a propertymodel that references the parent page and invokes its getSession via reflection at runtime so that whatever copy is active gets used. Don't know if this is your situation, though. ** Martin 2008/6/12 Milan Křápek [EMAIL PROTECTED]: Hi, I think I have a problem that cannot be solved. But I must ask about it. What I have: I have some page with table. In table are stored names of some actions. Each action can be edited. When I edit the action I open new ModalWindow with following content: It contains some ListView with operations that describe the parent action. Operations are parent dependent. So any change made on some operation affect each child of it. Each operation can be changed or there can be added or removed next operation. What I am trying to do: When I remove one row from operations in ModalWindow I try to add the whole modal window to Ajax target and refresh it. It looks good. When I do this all my LoadableDetachableModels are called and I load new data without the removed operation. On ListView is called method populateItem that should process this changes. But the content of Modal window does not change :o(. All I need is to make ModalWindow to rerender and show the new reloaded content. Where is the problem: The problem occurs when I am trying to add or remove some next operartion. Because when I do this I need to reload (reshow or resomething) the modalWindow to show content corectly. So I need to update number of lines of operations. But I think this is imposible. Because ModalWindow is provided by Ajax and ajax cannot change the HTML code. So when I delete one row I need it to be deleted and show new updated ListView , but all I can is to hide it. Possible solutiuons: 1. I think if I remove this content from ModalWindow to normal WebPage all problems will be solved, but this is the last solution because it will disrupt the style of my pages and I will have to remake all my presentation layer, because my app is based on pages with informations and all modifications are made in ModalWindows 2. After any operation that cannot be solved by Ajax (rendering changes made by removing or adding items) I close the ModalWindow and when user will want to continue with editing he will have to open the modal window again. But I think this will bothet the user and will be user unfriendly. 3. Or (and I dont know if it is possible) I will close current modal window, reload the page and then reopen modal window with new information. I know my entry is quite long and there are not any clear questions, but I want to know your opinion to this issue. Please if there is possibility to rerender only ModalWindow with new model, let me know. How would you solve my problem if you were on my place or which variant of my possible solutions will you choice? Is it possible to implement solution 3. and how? Thanks for any advices, responses and opinions. Best regards Milan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refresh ModalWindow - Impossible??
Hi, I think this is not my problem. I forgot mention it, but I pass to Panel that I show in modal window just one parameter. And it it the parent operation. When I render the modal window I allways read all operations form database. So I thing my model is allways up-to-date. I thing problem is that the ModalWindow can change values of its obejets, but cannot remove or add these objects. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refresh ModalWindow - Impossible??
Hi Milan That assumption are not correct. Modal window are fully updateable however you want it to be. Under certain circumstances you do have to set it up correctly (allowing for the modal window to be refreshed in ajax operations). I dont have sniplet ready, but you can search the list for modalwindow , and I have pasted something about this earlier... Milan K?ápek wrote: Hi, I think this is not my problem. I forgot mention it, but I pass to Panel that I show in modal window just one parameter. And it it the parent operation. When I render the modal window I allways read all operations form database. So I thing my model is allways up-to-date. I thing problem is that the ModalWindow can change values of its obejets, but cannot remove or add these objects. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refresh ModalWindow - Impossible??
Thanks for that. It is great that ModalWindow is updateable. I am sorry for bothering you. I try to find any note how to do it on wicket forums and try to google it, but I was not able to find anything. Plase you said that you write something about it. Can you give me link? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refresh ModalWindow - Impossible??
http://www.nabble.com/Modal-Window-not-opening-the-second-time-td16850180.html#a16955689 And you are not bothering me. If I were bothered I'd just not answered::) Milan K?ápek wrote: Thanks for that. It is great that ModalWindow is updateable. I am sorry for bothering you. I try to find any note how to do it on wicket forums and try to google it, but I was not able to find anything. Plase you said that you write something about it. Can you give me link? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refresh ModalWindow - Impossible??
Well I have it. Thank you very very much. I give up the thing that I will refresh whole ModalWindow. I do not know why but I am not able to do. But I found another way how to do it. I do not update the whole modal window but only its content. I think this was the main problem. Best regards Milan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refresh ModalWindow - Impossible??
Yeah, I also only updated the contents of the modal window.. Thats the idea with ajax only to update as little as possible... Milan K?ápek wrote: Well I have it. Thank you very very much. I give up the thing that I will refresh whole ModalWindow. I do not know why but I am not able to do. But I found another way how to do it. I do not update the whole modal window but only its content. I think this was the main problem. Best regards Milan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]