Re: Form Validations

2010-12-08 Thread notcourage

FeedbackLabel.onBeforeRender calls setModel(IModel) but wicket 1.4 doesn't
seem to have this method.

   protected void onBeforeRender() {
super.onBeforeRender();
this.setModel(null);
if(component.getFeedbackMessage()!=null){
if(this.text!=null){
this.setModel(text);
} else {
this.setModel(new
Model(component.getFeedbackMessage().getMessage()));
}

this.add(new AttributeModifier("class", true, new
Model("feedbacklabel " +
component.getFeedbackMessage().getLevelAsString(;
} else {
this.setModel(null);
}
}
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-Validations-tp1879918p3079456.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Form Validations

2010-12-08 Thread notcourage

Nevermind--I see that setModel is now setDefaultModel. See article comments:
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-Validations-tp1879918p3079482.html
Sent from the Users forum mailing list archive at Nabble.com.

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