Re: WORepetition problem
Re: WORepetition problem
- Subject: Re: WORepetition problem
- From: David Griffith <email@hidden>
- Date: Fri, 12 Mar 2004 12:36:50 +0100
What is the criteria to decide whether the user should see it or not? If
you have some criteria then you could use a WOConditional perhaps.
It seems that the setup you describe below would most likely display ALL
cats, and for each cat will display ALL products related to that cat.
Perhaps you only want to show products to a user based on some criteria like
product.userCanSeeThisProduct (which might a boolean).
If so, you could connect the item binding of the second repetition to a
method called for example 'findProducts' and the method in your code could
filter the array of products based on your criteria and return the relevant
NSMutableArray to the item binding of the repetition.
Now the item binding will only display the products that you select using
yout findProducts() method.
Hope this helps,
Regards,
Dave.
> Hi all,
>
> I've two table - Cat and Products . Products have authorization
> attributes.
>
> Cat and Products have a one to many relationship (CatID and ProductID)
> Cat is show through a WORepetition and inside this repetition I've a
> table with repetition for Product (via the relationship) see below :
>
> Rep 1 :(list) catList -> (item)catItem
> table with Repetition
> Rep 2 : (list)catItem.relationship ->(item) productItem
>
> I'll want to show only Products that user must see.
>
> How can do that ?
> _______________________________________________
> 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.
_______________________________________________
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.