validation in model classes with PropertyVetoException

2006-02-25 Thread Jurgen Lust
Hi, I have never really felt good about the validation framework of JSF (and Struts for that matter). The problem is that you are forced to put validation logic into your view layer, which in the case of JSF means polluting your jsp with validator tags. This becomes especially problematic

Re: validation in model classes with PropertyVetoException

2006-02-25 Thread Adam Winer
I think the complaint about the validation framework of JSF is only half right. It's bad that validation rules are specified in the view, and especially bad that they're specified in the actual JSP. However, it's absolutely correct that validation *happens* in the view. For example, how are

Re: validation in model classes with PropertyVetoException

2006-02-25 Thread Jurgen Lust
h:inputText value=#{myBean.foo}/ ... and then have: /** * @greaterThan 5 * @lessThan 15 */ public int getFoo() { ... } This seems the right way to go; PropertyVetoExceptions, not so much. That would indeed be the ideal way, but we are clearly not there yet. There is