Hi, I am using wicket 1.5 and I had already tried adding the page-level FeedbackPanel in the onSubmit() response - to no avail. But Session#info() seens to be doing the trick.
Thanks for the help! Philip 2011/10/3 Dan Retzlaff <dretzl...@gmail.com> > I'm looking at 1.4's WebSession#cleanupFeedbackMessages(), and it looks > like > only feedback messages associated with a component are always cleared. So > if > you associate the message with the Session itself (Session#info(...)), and > make sure no FeedbackPanels are rendered in the onSubmit() response, they > should still be available for your close button callback response. > > A hacky solution might be including the page-level FeedbackPanel in the > onSubmit() response, and *not* in the close button callback response. > > Let us know if you come up with a better solution. > > On Mon, Oct 3, 2011 at 8:57 AM, heapifyman <heapify...@gmail.com> wrote: > > > > > Ok, that I understand. Do you have an idea how to circumvent this and get > > the feedback message into the parent page? > > > > > > Am 03.10.2011 um 17:51 schrieb Dan Retzlaff: > > > > > > We use our own modal window class so I'm not sure what the best way to > go > >> is. But I can probably explain what's happening. The onSubmit request > >> renders the feedback into the modal, then clears the messages from the > >> session. Then in a separate close button callback request you're > >> re-rendering the page-level FeedbackPanel but at that point the feedback > >> messages are gone. > >> > >> On Mon, Oct 3, 2011 at 8:44 AM, heapifyman <heapify...@gmail.com> > wrote: > >> > >> In the ModalWindow I have an AjaxButton in whose onSubmit method I > >>> call ModalWindow.closeCurrent(**target); > >>> > >>> Is that not the right way to go? > >>> > >>> > >>> 2011/9/30 Dan Retzlaff <dretzl...@gmail.com> > >>> > >>> Each FeedbackPanel rendered in a response includes all messages > >>>> generated > >>>> during that request. The messages are then cleared from the session > and > >>>> won't be included in subsequent responses. Are you closing the modal > in > >>>> a > >>>> way that immediately generates a second request? > >>>> > >>>> Dan > >>>> > >>>> On Fri, Sep 30, 2011 at 9:02 AM, heapifyman <heapify...@gmail.com> > >>>> > >>> wrote: > >>> > >>>> > >>>> Hello, > >>>>> > >>>>> I have a page that contains a list of entries and a modal window > opened > >>>>> from > >>>>> that page. The modal window contains a form to add new entries to the > >>>>> > >>>> list > >>>> > >>>>> on the parent page. > >>>>> Submitting the form in the modal window adds the new entry, closes > the > >>>>> modal > >>>>> window and updates the list of entries in the parent page. > >>>>> This works fine. > >>>>> However, I would like to show a "success" message on the parent page > >>>>> > >>>> after > >>>> > >>>>> I > >>>>> submit the form in the modal window and close it. > >>>>> This does not seem to work because I have another FeedbackPanel in > the > >>>>> modal > >>>>> window for showing error messages when required fields are not > filled. > >>>>> This FeedbackPanel in the modal window seems to receive the success > >>>>> > >>>> message > >>>> > >>>>> instead of the FeedbackPanel on the parent page. > >>>>> > >>>>> I tried google and I also tried using an IFeedbackMessageFilter on > the > >>>>> modal > >>>>> window's FeedbackPanel, but to no avail. > >>>>> Any hints would be appreciated. Thanks > >>>>> > >>>>> > >>>> > >>> > > >