[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Validation exceptions
Our EOF model includes several entities with required (i.e., non-null)
attributes. For example, CreditCard's cardNumber attribute must not be
null.
In our WO app, we would like to be able to set a Purchase object's
creditCard relationship to nil and delete the credit card by setting its
cardNumber to nil (e.g., by erasing the number in the cardNumber
WOTextField). When we save, an EOValidationException is raised as
expected. I have overridden takeValuesFromRequest:inContext: in the
component whose changes are being saved and have called super's
implementation in an exception handling domain. In the handler, I
implement the credit card deletion. However, some other WO object
catches the exception so my handler is never invoked.
Can someone suggest a way to do this without the need to add "Delete"
buttons for any objects that we want to delete?
--
Art Isbell
Applications Programmer/Analyst
Cheap Tickets, Inc.
1440 Kapiolani Boulevard, #800
Honolulu, HI 96814
Voice: 1+808-945-7439
Fax: 1+808-945-0610
aisbell@cheaptickets.com
www.cheaptickets.com