Re: Letting a user see only the data they should.
Re: Letting a user see only the data they should.
- Subject: Re: Letting a user see only the data they should.
- From: Arturo Perez <email@hidden>
- Date: Tue, 04 May 2004 13:52:10 -0400
Justin Tocci wrote:
Hi Justin,
Unfortunately you haven't given us enough information to be of maximum
help to you. So, I'm going to make the following assumptions:
You have a User object backed by a table with a username and password
field as well as a user primary key. You have an Order object backed by
an order table that has its own pk and a foreign key to user. You've
set up a relationship from the User object to the Order object. That
relationship is named "orders".
When a user logs in you store the User object in Session with the key
"user".
I am putting together a website which requires a login. Once the user
logs in, they have access to the YOUR ORDER STATUS page.
Given the above assumptions you'd set up a WORepetition with the bindings
list = session.user.orders
item = anOrder
No fetchspecification necessary. You let the WORepetition iterate
through for you and you're done. You could use a WODisplayGroup and
make the call from java WODisplayGroup.setObjectArray() but I think
there are better ways to do even that.
You should try and find some of the more recent descriptions of the
books available on WO. The one you're using doesn't seem like it's
offering clear explanations for this stuff.
-arturo
Please visit http://webobjects.meetup.com/
_______________________________________________
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.