On lun, 2011-06-27 at 15:28 -0400, Greg Brown wrote: > >>>> Perhaps, but then the user could bypass the validation by invoking the > >>>> setter directly. > >>> Yes is true, but It is the same that property binding. If you call a > >>> setter directly nobody is notified of the change. > >> > >> Not sure what type of property binding you are referring to, but all Pivot > >> bean properties fire change events. > >> > > > > I was talking about a user JavaBean. For example in a Form, if you call > > a set method in response of a button event instead of the > > JavaBeanAdapter. > > I'm a little confused. I'm not familiar with the term "user JavaBean". Is > this simply a client-side bean, versus an EJB? Also, when you say > "JavaBeanAdapter", do you mean Pivot's BeanAdapter class? > Ok, well, if I remember, any class in java is a java bean (or JavaBean), in fact I was talking about a POJO (Plain Old Java Object).
And yes, JavaBeanAdapter is the pivot's one, sorry I think it's name was JavaBeanAdapter instead of BeanAdapter. > >>> I think that you like declaring validations at UI level instead of data > >>> level. > >> > >> Not necessarily. I think that certain validations make sense in the bean > >> itself, but others may be more appropriate for the UI to perform. > >> > > > > Ok, so a mix of both. Can you give me some examples of UI validation ? > > Not off the top of my head. You were the one that suggested splitting > validation between the bean and the UI, so I thought maybe you had some > particular examples in mind. ;-) I'm just saying I'm not necessarily > opposed to it. > > Ok, I will think more about it, because I only see validation on data model for now.