On 10/dic/08, at 18:42, David Holt wrote:
Hi Francesco.
On 10-Dec-08, at 8:59 AM, Francesco Romano wrote:
For the second question I solved...
I changed the datasource for the displayGroup: now I user the E12
instead of Ent2.
By the way... a question regarding WOBatchNavigationBar..
It's very useful, but... it displays the number of objects in the
entity, not the number of objects matching the qualifier... Is
there a way to show that number?
Yes. You need to qualify the displayGroup so that when it loads, it
has the correct number of objects that you wish to display.
One simple way to do this is to use a named fetch specification
(created inside EntityModeler) associated with the display group in
the component and make sure "fetches on load" is checked
Another way is to do the fetch and send the resulting array to the
displayGroup
I sometimes do this in the component constructor (again so that it
is available when the component loads)
setObjectArray(NSArray array)
Changes the WODisplayGroup's array of allObjects to array,
regardless of what its dataSource provides.
If you can't get it to work, post the relevant code from your
component and the java class.
The qualifier change.. it is based on a item in a PopUpButton..
So.. I don't want to refetch everything... (I use the navigation bar
to separate the batch... otherwise I'll "make" my own..
On 10/dic/08, at 17:43, Francesco Romano wrote:
Hi...
I read in the list that if I need an attribute in a many-to-many
relationship I cannot create a "flattern" relationship.
So I created a simple n-to-1 1-to-n.
That sounds right
Now.. I don't understand if I need to do some more "work" in my
classes...
What do you mean by "work"?
Well.. in the mail I read I saw some methods like
addToBothSideOfRelation(); (I just invented... I don't remember)..
I was thinking if I need those methods...
David
And... another thing: qualifier.
Let's call Ent1 and Ent2 the 2 entities above and E12 the relation
entity.
I want to fetch all the records in Ent2 that are linked to a
particular Ent1.
I can't do it.. because I've an array and I don't know how to
compare an array with a single value...
I tried something like
Ent2.E12.eq(Ent1.E12).and(Ent1.attr1.eq(myString)) but it did not
compile
Francesco
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]