I'm hoping someone can help me with my understanding. I've been updating my website to Wicket 6. In doing that the DateConverter I was applying to a field has started throwing a class cast exception.
After some work, I made the problem go away, by checking the class parameter in the over-ridden getConverter(Class type) method and only returning the DateConverter for a date object - as it's shown in the DateTextField class. All fine. My confusion is that the class cast exception happens at the point where Wicket is forming the error message. At that point it passes the name of the field's label ("birth date" in this case) to the DateConverter's toString method (which naturally expects a Date object) and hence the class cast exception. I just don't understand why it would do that? Why is the field label being sent to the field's converter? If I've misread what is happening then I apologize - I'm not an experienced java coder but I have checked and rechecked this because I just couldn't believe what I was seeing. And while I've made the problem go away, I'm concerned I've achieved that with a profound lack of understanding as to why it is happening. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validators-in-Wicket-6-tp4654349.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