You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Makundi <ma...@koodaripalvelut.com> on 2009/08/03 11:59:34 UTC

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
			List<Component> feedbacks = getRequestCycle().getMetaData(FEEDBACK_LIST);
			if (feedbacks == null)
			{
				feedbacks = new ArrayList<Component>();
				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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Feedback messages and ajax request

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
I added a jira issue with a possible fix suggestion:
https://issues.apache.org/jira/browse/WICKET-2411

**
Martin

2009/8/3 Martin Makundi <ma...@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 <ma...@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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Feedback messages and ajax request

Posted by Martin Makundi <ma...@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 <ma...@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
> Makundi<ma...@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
>>                        List<Component> feedbacks = getRequestCycle().getMetaData(FEEDBACK_LIST);
>>                        if (feedbacks == null)
>>                        {
>>                                feedbacks = new ArrayList<Component>();
>>                                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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Feedback messages and ajax request

Posted by Matej Knopp <ma...@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
Makundi<ma...@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
>                        List<Component> feedbacks = getRequestCycle().getMetaData(FEEDBACK_LIST);
>                        if (feedbacks == null)
>                        {
>                                feedbacks = new ArrayList<Component>();
>                                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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org