Re: Filtering an array of EO objects (next hurdle)
Re: Filtering an array of EO objects (next hurdle)
- Subject: Re: Filtering an array of EO objects (next hurdle)
- From: Jean Pierre Malrieu <email@hidden>
- Date: Mon, 10 Nov 2003 17:48:50 +0100
Given the problems you are facing, I would try another approch:
generate your list controler in code with the function
listFetchSpecificationWithEntityName (String entityName,
EOFetchSpecification fetchSpecification);
Then call runControllerInNewFrame.
Look at the EOControllerFactory class. You can't do serious D2JC
without it (sorry if you are already familiar with it)
Hope this helps.
JP.
Le dimanche, 9 nov 2003, ` 21:37 Europe/Paris, Ray Ackland a icrit :
> JP,
>
> Well, I've been playing around with giving these things a go, and have
> started discovering what some of the side effects can be.
> Unfortunately it looks like all the options I listed are subject to
> something.
>
> I have realised that if you replace the standard cover method for
> returning the related records, everything goes great - until you want
> to insert another record. This seems to call the replaced method (not
> sure why it calls a get method first) and in my tests used the
> incomplete and adjusted fetch - resulting in bad mojo. And yes, I had
> been warned about travelling in dangerous territory, but I need to
> explore these things for myself.
>
> Why I tried replacing the cover method is because doing an additional
> method didn't produce the results I wanted either. Remembering that
> this is D2J, it appears that the rule system looks in the EOModel to
> see what kind of object is going to be returned by the accessor
> methods, as it can't tell from the code (just specifies NSArray).
>
> When I create a secondary method to return the filtered array, the
> rule system doesn't know what kind of objects the array contains and
> so doesn't format it in a table or form as it would the normal method.
>
> Does anyone know how to tell the rule system to treat a custom
> method's return values (in an array) as EOObjects?
>
> Ray.
>
> On Thursday, Nov 6, 2003, at 02:03 Pacific/Auckland, Jean Pierre
> Malrieu wrote:
>
>>
>> Le 5 nov. 03, ` 09:10, Ray Ackland a icrit :
>>
>>> Jean Pierre,
>>>
>>> I am aware of the use of display groups in nib files with standard
>>> Java client apps, but does it apply to Direct to Java as well?
>>
>> Sure. Controllers in D2JC use display groups too.
>> D2JC will not allow you to make as much performance tuning as JC.
>> What I would do if I were you, is to (custom) fetch on the server
>> side (throuh remote method invocation), getting only the EOs you
>> want. Then you can pass an array to the client containing just the
>> info you need (maybe just an array of strings!). Then on the client
>> side, you can use swing components, or reconstruct lightweights EOs
>> from the array and put then in your display groups. But that's not a
>> D2JC approach.
>> Assuming you don't need such an extreme optimization, I don't
>> understand why you don't want to fetch on the server side, using
>> custom fetch spec that return just the EOs you need (solution b/)
>> If you want to (custom) fetch on the client-side, WO will synchronize
>> your EOs with the server side each time you save your data, so I
>> don't understand what problems you are afraid of running into
>> (solution c/).
>>
>> Good luck.
>>
>> PS: I know a JC expert who does JC optimization for a living here in
>> France, but as she is expecting to welcome two adopted kids this
>> week, I don't think we should bother her with our questions right >> now!
>>
>> Goog luck.
>>
>> JP.
_______________________________________________
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.