Sub Components, Bindings and Intialisation
Sub Components, Bindings and Intialisation
- Subject: Sub Components, Bindings and Intialisation
- From: Owen McKerrow <email@hidden>
- Date: Thu, 11 Nov 2004 14:40:32 +1100
Hi All,
Im trying to figure out exactly how Sub-components work, in particular
the bindings API stuff.
Lets say I wanted to make a sub-component that given a class name,
fetch's all entries for that class and displays it in a WORepition. So
I would set up a variable className of type String which I would then
set as a binding for this Sub-Component through the API editor. I drop
the component into the parent component and bind className binding to
the name of the class, lets say in this case Member.
Now I would have though that back over in the Sub-Components
constructor I would have just been able to use className, say for
getting all objects from the database of the Entity who's name was
passed in
e.g.
objcectList = EOUtilities.objectsForEntityNamed(ec,className);
Where objectsList is the array I use with my repetition.
However it appears to me that the className variable doesn't get set
until after the component has initialized. This being the case how do I
then execute code that this dependent on the bindings after the
constructor has been called but before the response is sent ?
i.e. how do I get the the component to get the objects from the
database if className is not set until after the constructor has been
called ?
Thanks
Owen
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
People who prefer typing to pointing then seem to prefer acronyms to
save typing :-)
-Denis Stanton, On people using Command Line Interfaces
_______________________________________________
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