• 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: Setting a custom EOFetchSpecification for a WODisplayGroup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a custom EOFetchSpecification for a WODisplayGroup


  • Subject: Re: Setting a custom EOFetchSpecification for a WODisplayGroup
  • From: Jean Pierre Malrieu <email@hidden>
  • Date: Mon, 29 Oct 2007 11:04:53 +0100

You have more control if you create the displayGroup in your code (for example in the component constructor, or in initialization for your component).
First create a EODatabaseDataSource, then the displayGroup.
You can then use setFetchSpecification(EOFetchSpecification fetchSpec) or setFetchSpecificationByName(String fetchSpecificationName) on your datasource object. To get the objects, either set "fetchOnload" or use "qualifyDataSource" on the displayGroup.


HTH

JPM


Hello,

I am very much a WO novice, just working my way through Ruzek's "WO
web application construction kit".

I'm writing a very simple application.  I have a table called
"task" (in a PostgreSQL database), and one of the columns is
"active".  What I thought I'd do is set up two WODisplayGroups, one
to collect the tasks where active == 'yes', the other for tasks where
active == 'no', as I want to display them in two separate tables.

I'm using Eclipse 3.2.2, so I'm hand-editing the WOO file.  What I
_thought_ I could do was replace the literal declaration of
fetchSpecification for the WODisplayGroup (which I just copied over
from something auto-generated from WO Builder) with a reference to a
method in the component's Java class that returned an
EOFetchSpecification.  That is, instead of this:

            dataSource = {
                class = EODatabaseDataSource;
                editingContext = "session.defaultEditingContext";
                fetchSpecification = {
                    class = EOFetchSpecification;
                    entityName = Task;
                    fetchLimit = 0;
                    isDeep = YES;
                };
            };

I tried this:

            dataSource = {
                class = EODatabaseDataSource;
                editingContext = "session.defaultEditingContext";
                fetchSpecification = activeFetchSpec;
            };
_______________________________________________
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: Setting a custom EOFetchSpecification for a WODisplayGroup
      • From: Paul Lynch <email@hidden>
  • Prev by Date: Re: Documentation : call for help
  • Next by Date: Re: Setting a custom EOFetchSpecification for a WODisplayGroup
  • Previous by thread: Re: Setting a custom EOFetchSpecification for a WODisplayGroup
  • Next by thread: Re: Setting a custom EOFetchSpecification for a WODisplayGroup
  • Index(es):
    • Date
    • Thread