You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Patrick Davids <pa...@nubologic.com> on 2016/02/29 17:28:50 UTC
adding FeedbackMessages in onBeforeRender()
Hi all,
is there any way to add a message when onBeforeRender() is called?
I have a behavior for a special use-case which does some checks and
provides feedback to the user when a check is unsuccessfull.
But I get a
org.apache.wicket.WicketRuntimeException: Cannot modify component
hierarchy after render phase has started (page version cant change then
anymore)
I know this restriction... but I need this kind of check on render-time
not on configure-time of the component due to visibility issues.
If someone has an idea how to fake "onBeforeRender()" some how to get my
feedback message... this would be great.
Thanx and best regards
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: adding FeedbackMessages in onBeforeRender()
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
Try with Session.get().error(...) instead of component.error(....).
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Mon, Feb 29, 2016 at 5:28 PM, Patrick Davids <
patrick.davids@nubologic.com> wrote:
> Hi all,
> is there any way to add a message when onBeforeRender() is called?
>
> I have a behavior for a special use-case which does some checks and
> provides feedback to the user when a check is unsuccessfull.
>
> But I get a
> org.apache.wicket.WicketRuntimeException: Cannot modify component
> hierarchy after render phase has started (page version cant change then
> anymore)
>
> I know this restriction... but I need this kind of check on render-time
> not on configure-time of the component due to visibility issues.
>
> If someone has an idea how to fake "onBeforeRender()" some how to get my
> feedback message... this would be great.
>
> Thanx and best regards
> Patrick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>