behaviors aren't really designed to work like components and render markup
like that, so it's a bit weird... what if you want to go extend or change
the markup for the feedback error? it's now embedded in a bunch of code.
walnutmon wrote:
>
> In order to add feedback next to the component I used a behavior. I had
> some code from Igor which got me on the right track, although I was unable
> to actually get it to work the same way, I simplified it down to the
> following code:
>
> AbstractBehavior printMessagesNextToComponent = new AbstractBehavior()
> {
>
> @Override
> public void onRendered(Component component)
> {
> super.onRendered(component);
> FeedbackMessage message =
> component.getFeedbackMessage();
> if (message != null)
> {
> final Response out = component.getResponse();
> out.write("");
> out.write(message.getMessage().toString());
> out.write("");
> }
> }
> };
>
> It almost seems too simple, I've tried it and with limited testing it
> seems to work just fine, although there are some odd behaviors with
> Ajax... does anyone have any comments, better solutions, or possible
> breaking conditions that I should check out?
>
--
View this message in context:
http://www.nabble.com/Feedback-Next-To-Component-tp21959520p21964449.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]