• 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
Custom class with D2W
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Custom class with D2W
      • From: Robert Walker <email@hidden>
  • Prev by Date: Re: Forms and page refresh
  • Next by Date: Re: Custom class with D2W
  • Previous by thread: Re: whywebobjects.com
  • Next by thread: Re: Custom class with D2W
  • Index(es):
    • Date
    • Thread