Re: Custom Component Problems
Re: Custom Component Problems
- Subject: Re: Custom Component Problems
- From: Chuck Hill <email@hidden>
- Date: Mon, 19 Mar 2007 12:52:56 -0700
On Mar 19, 2007, at 12:10 PM, Jorge Ramirez wrote:
Hello, i am having a problem creating a custom re-usable
component. I am fairly new to WebObjects, so forgive me if i am
going about this all wrong. The problem is as follows:
I have groups, users and permissions in my application. The users
are members of groups and the groups get assigned permissions.
I want to be able to, based on weather the user has read/read and
write/no permission on an object's attributes, display one of the
following:
a string (if the user has read only access)
a textfield/popupmenu/etc... (if the user has read and write access)
a permission denied string (if the user does not have permission)
I have created a component with the following bindings:
readPermissionName (the name of the permission required to have
read access for the attribute on the given object)
writePermissionName (the name of the permission required to have
write access for the attribute on the given object)
record (the record in question)
value (the string value of the attribute)
Can you give an example of this binding?
the component then either displays:
a permission denied string if the user does not have permission
a string with the string value of the attribute if the user has
read only access
or a component content if the user has read and write access (in
the component that would use this component, i would put a
textfield, or popup menu in the component content area)
It appears to work in the way that it displays either a string, a
permission denied string, or whatever i put in the componentcontent
area. The problem i am having is when i want to save the value of
lets say a textfield in the read/write component content area. The
value is not getting pushed back to the object when i call
saveChanges();
I think it might have something to do with the caret symbol, but i
have never been too clear on when to use that and when not to use
that. Does anyone have any ideas?
Is the component non-synchronizing (with its bindings) or stateless?
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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