You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by notcourage <kl...@gmail.com> on 2010/12/09 02:42:28 UTC
Re: Form Validations
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Form Validations
Posted by notcourage <kl...@gmail.com>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org