So the intentional use that you register other converters with a field other
than those intended for use with the model?

An example:
You've added a behavior to a component, which renders a value into the "title" attribute of the tag. The value might be a number, while the component's model object is a date. The component provides the converter for each of these values, i.e. a NumberConverter and a DateConverter.

>I just can't conceive of why you would even want a converter for a field's label.

You would't ;).
All vars of error messages are converted, it just happens that the label is one of them. We might want to shortcut this by checking the type of the variable if it's already a String (before trying to convert it).

Hope this helps
Sven


On 11/30/2012 08:51 PM, Hobbes00uk wrote:
So the intentional use that you register other converters with a field other
than those intended for use with the model?

I just can't conceive of why you would even want a converter for a field's
label. It just seems a bizarre thing to do. I can sort of see that it's a
"place" to stick handy converters perhaps, but it does seem like a weird
hack.

That was my point really, I was really trying to understand under what
conditions this "place to stuff converters other than the one for the model"
would be useful. I could see what the code did... I just didn't understand
*why* that is considered useful (and it obviously wasn't legacy having been
deliberately implemented).





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validators-in-Wicket-6-tp4654349p4654396.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



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

Reply via email to