[Essentialdata-discuss] RE: Essentialdata-discuss digest, Vol 1 #24 - 3 msgs
Brought to you by:
dankib01
From: Kibler, D. (HQP) <Dan...@rh...> - 2005-01-25 19:04:22
|
Alex With my proposed approach, you can't tab to another field in the same = row, but you can select another field in the same row with the mouse. = That part of the "it's not perfect." So you can edit the data in other = fields after failing the validation. Another, not so perfect part, is = that you can't delete a row until it validates. So if you insert a row = and then change your mind, you can't do anything else until you make it = valid. Adding some flexibility to your validation method could help a = bit there. From my testing, it appears that MROTable (MRO?) does use = POJOObjectAdapter. I haven't gotten any farther trying to figure out how = to use that knowledge, tho. The problem I'd like to solve is to get MROTable (or it's supporting = objects like Model) to listen to PropertyChangeEvents from the bean. = Right now calculated fields are not updated in the table until the row = is refreshed. It would also allow you to update the bean independent of = the View (table) and have the changes reflected in the table. Regards Dan --__--__-- Message: 3 Date: Mon, 24 Jan 2005 14:28:51 -0600 From: Alex Garrett <lj...@gm...> To: ess...@li... Subject: Re: [Essentialdata-discuss] Re: row-level validation Reply-To: ess...@li... Dan, I think that's generally a good idea, but the one sticking point I have is that an individual cell may be valid without the row being valid. For example, assume there are two cells bound to properties Foo and Bar. The row is valid iff Foo and Bar are blank or Foo and Bar are numbers whose difference is prime. When the table loads, the row will be valid because it's blank. However, if the user enters '8' in Foo, the row is invalid because Bar is 0. At this point, the user can't just tab over to Bar to enter in '3', like they had planned. Essentially, there's a "Control -> POJOFieldAdapter -> property" relationship that's indicated by the "boundTo" property in the Control. I'm wondering if there's a similar "Row Composite -> POJOObjectAdapter -> Bean" relationship that I could take advantage of. Thanks, Alex |