Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1423B11082 for ; Thu, 12 Jun 2014 08:30:26 +0000 (UTC) Received: (qmail 85694 invoked by uid 500); 12 Jun 2014 08:30:24 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 85643 invoked by uid 500); 12 Jun 2014 08:30:24 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 85629 invoked by uid 99); 12 Jun 2014 08:30:24 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 08:30:24 +0000 Received: from localhost (HELO mail-wi0-f173.google.com) (127.0.0.1) (smtp-auth username mgrigorov, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 08:30:23 +0000 Received: by mail-wi0-f173.google.com with SMTP id cc10so5167714wib.6 for ; Thu, 12 Jun 2014 01:30:21 -0700 (PDT) X-Received: by 10.180.12.33 with SMTP id v1mr4412134wib.0.1402561821942; Thu, 12 Jun 2014 01:30:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.105.74 with HTTP; Thu, 12 Jun 2014 01:29:41 -0700 (PDT) In-Reply-To: <1402559689188-4666217.post@n4.nabble.com> References: <1402558481551-4666216.post@n4.nabble.com> <1402559689188-4666217.post@n4.nabble.com> From: Martin Grigorov Date: Thu, 12 Jun 2014 10:29:41 +0200 Message-ID: Subject: Re: how to change the panel data from a modal window opened from AjaxLink.onClick() ? To: "users@wicket.apache.org" Content-Type: multipart/alternative; boundary=001a11c240922c583304fb9f5f03 --001a11c240922c583304fb9f5f03 Content-Type: text/plain; charset=UTF-8 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 wrote: > Addition: > > NestedTree and ModalWindow is placed on a TreePage: > TreePage.html >
>
[tree]
> > TreePage.java > > public TreePage () { > dialog = new ModalEditDialog("modaleditdialog"); > dialog.setResizable(true); > dialog.setAutoSize(true); > dialog.setOutputMarkupId(true); > ... > add(dialog); > > NestedTree nestedTree = new NestedTree(id, provider) { > protected Component newContentComponent(String id, IModel 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-unsubscribe@wicket.apache.org > For additional commands, e-mail: users-help@wicket.apache.org > > --001a11c240922c583304fb9f5f03--