Feedback messages and ajax request
Hi! In normal requests feedbackmessages are processed like follows: public final void beforeRender() { if (!(this instanceof IFeedback)) { internalBeforeRender(); } else { // this component is a feedback. Feedback must be initialized last, so that // they can collect messages from other components ListComponent feedbacks = getRequestCycle().getMetaData(FEEDBACK_LIST); if (feedbacks == null) { feedbacks = new ArrayListComponent(); getRequestCycle().setMetaData(FEEDBACK_LIST, feedbacks); } feedbacks.add(this); } } However, in AJAX requests I cannot find any such logic and feedback is often left out. Is this a bug? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback messages and ajax request
Feedbacks should be processed in prepareRender method which should be called on Ajax requests as well. If it isn't it would be a bug. -Matej On Mon, Aug 3, 2009 at 11:59 AM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: Hi! In normal requests feedbackmessages are processed like follows: public final void beforeRender() { if (!(this instanceof IFeedback)) { internalBeforeRender(); } else { // this component is a feedback. Feedback must be initialized last, so that // they can collect messages from other components ListComponent feedbacks = getRequestCycle().getMetaData(FEEDBACK_LIST); if (feedbacks == null) { feedbacks = new ArrayListComponent(); getRequestCycle().setMetaData(FEEDBACK_LIST, feedbacks); } feedbacks.add(this); } } However, in AJAX requests I cannot find any such logic and feedback is often left out. Is this a bug? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback messages and ajax request
Is it possible they are not ajax-processed at all if they are not visible in some earlier stage (=if there are no messages when isvisible is checked...??)? ** Martin 2009/8/3 Matej Knopp matej.kn...@gmail.com: Feedbacks should be processed in prepareRender method which should be called on Ajax requests as well. If it isn't it would be a bug. -Matej On Mon, Aug 3, 2009 at 11:59 AM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: Hi! In normal requests feedbackmessages are processed like follows: public final void beforeRender() { if (!(this instanceof IFeedback)) { internalBeforeRender(); } else { // this component is a feedback. Feedback must be initialized last, so that // they can collect messages from other components ListComponent feedbacks = getRequestCycle().getMetaData(FEEDBACK_LIST); if (feedbacks == null) { feedbacks = new ArrayListComponent(); getRequestCycle().setMetaData(FEEDBACK_LIST, feedbacks); } feedbacks.add(this); } } However, in AJAX requests I cannot find any such logic and feedback is often left out. Is this a bug? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback messages and ajax request
I added a jira issue with a possible fix suggestion: https://issues.apache.org/jira/browse/WICKET-2411 ** Martin 2009/8/3 Martin Makundi martin.maku...@koodaripalvelut.com: Is it possible they are not ajax-processed at all if they are not visible in some earlier stage (=if there are no messages when isvisible is checked...??)? ** Martin 2009/8/3 Matej Knopp matej.kn...@gmail.com: Feedbacks should be processed in prepareRender method which should be called on Ajax requests as well. If it isn't it would be a bug. -Matej - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org