• 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
WODisplayGroup - how to insert default values?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WODisplayGroup - how to insert default values?


  • Subject: WODisplayGroup - how to insert default values?
  • From: Clive Roberts <email@hidden>
  • Date: Thu, 21 Apr 2005 10:03:39 +0100

I do not normally use WODisplayGroups and want to use one to list and insert EOObjects (CharityMembers). It should be simple, but I am having difficulty setting default values!

My EOEnterpriseObject - CharityMember - has a "type" (an inheritance attribute for single table inheritance) that needs to be be programmatically set to a non-null value.

I created a Display Group Component using XCode and chose a layout to display a selected record, paginated, and then selected the attributes to display and for a hyperlink. The wizard creates the component complete with:

protected CharityMember charitymember; // used when an object is selected
protected WODisplayGroup charitymemberDisplayGroup;

public MemberList(WOContext context) { ...
public void selectObject() {...
public void saveChanges() throws Exception {...

The component calls "charitymemberDisplayGroup.insert();" to insert new values into the display group. and calls saveChanges() to persist objects.
The component WOTextFields have settings "
charitymemberDisplayGroup.selectedObject..."

QUESTION: how should I set the value of the "type"?
I have tried e.g.
... .takeStoredValueForKey("CM", "type"); on the display group's selectedObject(), but when I save I get an exception saying the value for type must not be null!
What am I missing?

thanks in anticipation
Clive Roberts
 _______________________________________________
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: WODisplayGroup - how to insert default values?
      • From: Sacha Mallais <email@hidden>
    • Re: WODisplayGroup - how to insert default values?
      • From: Wolfram Stebel <email@hidden>
  • Prev by Date: RE: [ANN] ExistsInRelationshipQualifier: WHERE EXISTS (SELECT 1FROM A WHERE ...)
  • Next by Date: ValidationException, need help
  • Previous by thread: Apple WebObjects Class
  • Next by thread: Re: WODisplayGroup - how to insert default values?
  • Index(es):
    • Date
    • Thread