Re: Postponed validation possible?

2009-11-12 Thread Riccardo De Menna
Oh, and the push changes thing appears to be controlled by a property. It appears that if you want to turn it on you would put er.extensions.ERXValidationShouldPushChangesToObject=true In your properties file. It doesn't seem to work for me. Even though I turn it on, a model based

Re: Postponed validation possible?

2009-11-12 Thread Anjo Krank
Gee, it's been 5 years since I last touched this... You need to override public void validationFailedWithException(Throwable e, Object value, String keyPath) { in your page and have code similar to the stuff in ERD2WPage, also you need to extend ERXGenRec and let it use

Postponed validation possible?

2009-11-11 Thread Riccardo De Menna
Hi, I'd like some help in figuring out if what I'm doing has dangerous implications. EOF objects that are edited in WOComponents go through two validations for what I see. The first is done on assignment by WOComponent and the second by EOCustomObject on save. This can sometimes hamper my ui

Re: Postponed validation possible?

2009-11-11 Thread Chuck Hill
On Nov 11, 2009, at 10:39 AM, Riccardo De Menna wrote: Hi, I'd like some help in figuring out if what I'm doing has dangerous implications. EOF objects that are edited in WOComponents go through two validations for what I see. The first is done on assignment by WOComponent and the second

Re: Postponed validation possible?

2009-11-11 Thread Lachlan Deck
On 12/11/2009, at 5:39 AM, Riccardo De Menna wrote: I'd like some help in figuring out if what I'm doing has dangerous implications. EOF objects that are edited in WOComponents go through two validations for what I see. The first is done on assignment by WOComponent and the second by

Re: Postponed validation possible?

2009-11-11 Thread Lachlan Deck
On 12/11/2009, at 7:16 AM, Chuck Hill wrote: On Nov 11, 2009, at 10:39 AM, Riccardo De Menna wrote: I'd like some help in figuring out if what I'm doing has dangerous implications. EOF objects that are edited in WOComponents go through two validations for what I see. The first is done on

Re: Postponed validation possible?

2009-11-11 Thread Anjo Krank
@Override public Object valueForKey( String key ) { This actually works? Yikes! Why not simply push the value to the EO and be done with it? If it's invalid, the EC can't save and will throw validation errors and it will be restored on the next revert(). Cheers, Anjo

Re: Postponed validation possible?

2009-11-11 Thread Lachlan Deck
On 12/11/2009, at 8:49 AM, Anjo Krank wrote: @Override public Object valueForKey( String key ) { This actually works? Yikes! Yes. Why not simply push the value to the EO and be done with it? If it's invalid, the EC can't save and will throw validation errors and it will be restored on

Re: Postponed validation possible?

2009-11-11 Thread Anjo Krank
Because then the user loses what they typed which can sometimes be annoying (e.g., if it's too long a string etc) As i said: then push the invalid value. This is what ERXValidation does. Cheers, Anjo ___ Do not post admin requests to the list.

Re: Postponed validation possible?

2009-11-11 Thread Lachlan Deck
On 12/11/2009, at 8:53 AM, Anjo Krank wrote: Because then the user loses what they typed which can sometimes be annoying (e.g., if it's too long a string etc) As i said: then push the invalid value. This is what ERXValidation does. And if the value's of the wrong type or can't be

Re: Postponed validation possible?

2009-11-11 Thread Anjo Krank
Because then the user loses what they typed which can sometimes be annoying (e.g., if it's too long a string etc) As i said: then push the invalid value. This is what ERXValidation does. And if the value's of the wrong type or can't be coerced? if (eo instanceof

Re: Postponed validation possible?

2009-11-11 Thread Riccardo De Menna
Ok, I'm in a wonder-enabled scenario so how do I use it? Need to call setPushChangesDefault(true) somewhere? rdm On 11/nov/2009, at 14.38, Anjo Krank wrote: Because then the user loses what they typed which can sometimes be annoying (e.g., if it's too long a string etc) As i said: then

Re: Postponed validation possible?

2009-11-11 Thread Ramsey Lee Gurley
Nice :-) I learned something today. Ramsey On Nov 11, 2009, at 5:38 PM, Anjo Krank wrote: Because then the user loses what they typed which can sometimes be annoying (e.g., if it's too long a string etc) As i said: then push the invalid value. This is what ERXValidation does. And if