Custom class with D2W
Custom class with D2W
- Subject: Custom class with D2W
- From: Pete Rive <email@hidden>
- Date: Tue, 8 Nov 2005 10:44:05 +1300
Hi to all you WO masters of the universe,
I am a newbie trying to build a D2W app. I started out looking at a Java Client app but decided to change to a D2W.
I am trying to customise some business logic that will allow automatically include a value when a new record is added to the database. In Direct to Java I used the following code on the App server which did what I wanted it to do:
public void awakeFromInsertion(EOEditingContext context) { super.awakeFromInsertion(context); if (value() == null) { setValue(new BigDecimal("500")); } } }
ie. When any new record was added it would automatically have a value "500".
However, I can't work out whether this code is appropriate for a Direct to Web app and what Java file to annotate eg Application.Java, DirectAction.Java etc ? I have started to try and learn Java to work it out but it could take awhile.
Does anyone have any suggestions?
Cheers Pete
|
_______________________________________________
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