Hi all,

We have been using the examples given in the "FormsWithFlair" for a while
and it has been working very well.
However, we recently migrated from wicket 1.5.x to 6.3.0 and the code
didn't compile because of some api changes.

Here's the code that worked in 1.5.x
public class ValidationMsgBehavior extends AbstractBehavior
    public void onRendered(Component c)
        FormComponent fc = (FormComponent) c;
        if (!fc.isValid()) {
            String error;
            if (fc.hasFeedbackMessage()) {
                error = fc.getFeedbackMessage().getMessage().toString();
            } else {
                error = "Your input is invalid.";
                    "<div class=\"validationErrorMessage\">" + error +

Am I right to say that I can replace AbstractBehavior with Behavior?
But I'm not sure what will be the best way to handle the feedback messages
related code.
Is a call to "hasFeedbackMessage()" correct now or should we use a feedback
collector here?
"getFeedbackMessage()" has been removed so I have no choice but to use
feedback collector to get it.

On Tue, Nov 6, 2012 at 3:09 AM, Rafał Krupiński <r.krupin...@gmail.com>wrote:

> On 05.11.2012 17:01, Martin Grigorov wrote:
>> See FormsWithFlair application and PDF at
>> http://code.google.com/p/**londonwicket/downloads/list<http://code.google.com/p/londonwicket/downloads/list>
>> It also shows how a behavior can be used for this.
> Thanks for the link, looks very promising.
> Best Regards
> Rafał Krupiński
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org>
> For additional commands, e-mail: users-h...@wicket.apache.org

Thanks & regards
James Selvakumar

Reply via email to