Re: JavaClient RMI and Validation
Re: JavaClient RMI and Validation
- Subject: Re: JavaClient RMI and Validation
- From: Greg Hulands <email@hidden>
- Date: Fri, 11 Apr 2008 04:56:19 -0700
myEO.validateForSave()
On Apr 11, 2008, at 1:57 AM, David Avendasora wrote:
It's a complicated function that steps through lots of relationships
adds up values. It needs to be aware of other changes made in a
given Editing Context, so I don't think I can do it via stateless. I
guess telling it not to do the validation, if this were even
possible, is not the right way to do it.
I will just try to keep the RMI from happening until everything is
validated. Is there a way of manually triggering validation on an EO
instead of waiting for the EC to do it while saving?
Dave
On Apr 10, 2008, at 9:49 PM, Florijan Stamenkovic wrote:
Dave,
Is there a reason that stateless RMI is out of the question? What
is the remote method doing? When does it get triggered?
I believe that when using EO based RMI you simply can not avoid it
committing changes, but maybe the functionality you need can be
made differently...
Flor
On Apr 10, 2008, at 17:43, David Avendasora wrote:
Hi all,
While this is a Java Client application I'm working on, I think
the question may be more of a "nested editing contexts" question.
With WO on the client side you can call methods that only exist on
the server. This is useful for doing things that may require
fetching large numbers of records from the database and processing
them without copying them down to the client. This is much like
how a normal web application works.
A WO Java Client application has a version of EOF that sits on the
client, including client-side EOEditingContexts that are basically
a snapshot of the corresponding EC on the server.
Now, the tricky part is when you invoke a remote method on the
server, the first thing the client side EOF does is resync the
client-side EC up to the server. This is basically the same thing
as saving a normal EC, in that it triggers validation.
Does anyone have a way to disable the validation for a specific
Remote Method Invocation (RMI), or and elegant way to not send the
RMI unless the EO passes validation?
Right now I'm adding a EOGenerator method that simply checks for
any properties that cannot be null, and if any are it returns
"false" and I have all my RMI calls wrapped in an "if" statement
to keep them from firing.
Thanks!
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden