Hi,

The problem is that EditPage when deserialized creates a new copy of
MyPanel instance and its bChanged member field.
The best/simplest way is to use a Panel as ModalWindow content instead of a
Page.
Another way to share bChanged between the pages is to store it in the
session (i.e. MySession#bChanged).
Yet another way is to get a reference to bChanged thru the first page:
- pass a PageReference of page1 to editpage and later use it:
pageRef.getPage().setChanged(true)

Martin Grigorov
Wicket Training and Consulting


On Thu, Jun 12, 2014 at 9:54 AM, Duke <warlock9...@gmail.com> wrote:

> Addition:
>
> NestedTree and ModalWindow is placed on a TreePage:
> TreePage.html
> <div wicket:id="modaleditdialog"></div>
> <div wicket:id="tree">[tree]</div>
>
> TreePage.java
>
> public TreePage () {
> dialog = new ModalEditDialog("modaleditdialog");
> dialog.setResizable(true);
> dialog.setAutoSize(true);
> dialog.setOutputMarkupId(true);
> ...
> add(dialog);
>
> NestedTree<T> nestedTree = new NestedTree<T>(id, provider) {
>   protected Component newContentComponent(String id, IModel<T> model) {
>     MyPanel panel = new MyPanel(id, this, model, dialog,...);
>     panel.setOutputMarkupId(true);
>     return panel;
>   }
> }
> nestedTree.setOutputMarkupId(true);
> add(nestedTree);
> ...
> }
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-change-the-panel-data-from-a-modal-window-opened-from-AjaxLink-onClick-tp4666216p4666217.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to