Man, I came back from a long weekend and the updateFeedback() method was
gone! It appears that my code still works just peachy without it, so thanks
to whoever took care of that!
Chuck
ChuckDeal wrote:
>
> I have a scenario where upon submitting the page, a feedback message is
> added, something like info("Last Saved: {datetime}").
>
> I now am working on a different feature that wants to add feedback in the
> onBeforeRender() method of the page. At first, I was only seeing the
> original message (Last Saved...) and upon tracing it, I can see that the
> render process first updates all IFeedback objects and THEN processes the
> onBeforeRender. This means that my new message wasn't getting set in time
> to catch where the IFeedback objects were getting init'ed.
>
> So, I thought that I would simply call updateFeedback on my panel after I
> addedmy new message. But this didn't work either. So, upon digging into
> that, I found that the messages list is cached inside the
> FeedbackMessagesModel (the default model for the FeedbackPanel). I'm OK
> with the idea of caching, but I would have expected that calling
> updateFeedback (cache or otherwise) would have caused my feedback panel to
> get the latest set of messages. Here's what I did to overcome the
> problem:
>
> final FeedbackPanel feedback = new FeedbackPanel("feedback") {
> @Override
> public void updateFeedback() {
> get("feedbackul:messages").detach();
> super.updateFeedback();
> }
> };
>
> Is this acceptable/desirable? If this is acceptable, should the
> FeedbackPanel be updated with this fix? If so, I can follow up with a
> JIRA.
>
> Or would the recommendation be to use a different FeedbackModel impl that
> doesn't cache?
>
> Chuck
>
--
View this message in context:
http://www.nabble.com/Updating-FeedbackPanel-tf4355824.html#a12480679
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]