• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Server-Side vs Client-Side validation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Server-Side vs Client-Side validation


  • Subject: Server-Side vs Client-Side validation
  • From: Alexandre Mainville <email@hidden>
  • Date: Mon, 18 Apr 2005 00:14:01 -0400

Hi,

I'm having problems seperating my business logic between server and client side.

I started off with a common class (MyRecord.java in packages MyApp.logic.common) and added the required validateKey methods and everything works fine this way.

Now I would like to take some of the more sensitive logic and validation and have it run server-side. I changed my model to use seperate classes (MyRecord.java in MyApp.logic.server and MyRecord.java in MyApp.logic.client). When the two classes are identical, everything still works fine. However when I remove the sensitive logic from the client-side I experience the following problem.

I have a single user accessing a single instance.
The user changes an object so that it is in an invalid state (won't pass validation) and hits save.
The server-side logic throws a NSValidation.ValidationException exception.
The user gets a popup with the exception message.
The user hits save again without making any changes or making changes and still leaving the object in an invalid state.
The server side validation method is NOT called.
The user gets an Optimistic locking failure (The object with global ID ... has been changed by another client!)


Out of despair, I created a new model with a single entity having only a primary key and a single attribute and used it in a completely new project. It exhibited the same problem.

I tried disabling optimistic locking by removing the padlocks in eomodeler from all attributes but that didn't help.

I have a server side method that verifies user credentials for login that works perfectly, the problem only occurs with validation it seems.

As anyone had this problem before? Is server-side validation supposed to work?

Thanks

Alex


_______________________________________________ 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
  • Prev by Date: Re: Multiple Database Question
  • Next by Date: Re: Bi-directional One-to-one relationship
  • Previous by thread: Re: WebObjects FUTURE... WEBX ?
  • Next by thread: Web pages localotation in WO
  • Index(es):
    • Date
    • Thread