• 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
Re: WODisplayGroup help (David Griffith)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WODisplayGroup help (David Griffith)


  • Subject: Re: WODisplayGroup help (David Griffith)
  • From: Jean Pierre Malrieu <email@hidden>
  • Date: Tue, 4 Nov 2003 10:58:56 +0100

Start by creating a "display group component" (template available from the new file menu item). You get a Wizard. Play with the different wizard setting and look at the generated components. That will help you understanding how display groups work in relation to interface elements.
To configure the display groups that are not created programmatically, double-clik on the display group's name in WOBuilder.
By default, display groups fetch into the session's default editing context. If you need to use another editing context, or need more control on the display group properties, you need to create the display group programmatically, which involves creating a data source. (3 lines of code max!).


To insert objects, just bing a button to the display group's insert method.
As soon as your data fields for the selected object are in a a WOform, clicking on a submit button will automatically update your object' attribute values... Thats the WebObjects magic!


Jean Pierre.


Hi all,

I don9t really understand the operation of WODisplayGroups and how to use
them.


What I am trying to do:

When a given page loads (a component initialises) it searches for a record
in a table based on a value that is already in a variable. This is achieved
with a WODisplayGroup and a pre defined model with a fetch spec. This part
appears to work. I get a displayedObjects>0 for the DisplayGroup. Now, the
user never clicks anything on this page to select9 an object in the
DisplayGroup so I need to have access to the row in the DisplayGroup that I
need, namely the first one as there should only be one.


I want to be able to modify these values via a form on this page, then write
the new values to the database. Also, I want to be able to insert new rows
if there was no existing row located (from above). In other words, if no
row was found in the database, give me some empty fields to type in, then
when I save, insert instead of update.


The problems I have:

1. The form fields do not display any values - currently using
imageDisplayGroup.selectedObject.imagesImageId for example. I guess this is
because selected object is null, but don9t know what to do next.
2. I don9t know how to set a new record for the user to enter data in, then
be able to add some values myself before the insert and have it insert
instead of update. Even if I could see the values in the form, how would I
assign some other values programatically? If I cast the selected object to
Images9 and modify the values, does this then have to be put back9 in the
DisplayGroup or does it update the values in the DisplayGroup by reference?


Any helpful hints would be appreciated ;-)

Thanks,
Dave.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Subject: Re: Filtering array returned by an EO's relationship (D2J)
  • Next by Date: Re: Filtering array returned by an EO's relationship (D2J)
  • Previous by thread: Subject: Re: Filtering array returned by an EO's relationship (D2J)
  • Next by thread: Just in case someone wants to know
  • Index(es):
    • Date
    • Thread