Parent Component Continued...
Parent Component Continued...
- Subject: Parent Component Continued...
- From: Hunter Hillegas <email@hidden>
- Date: Fri, 23 Apr 2004 23:01:02 -0700
I decided to try getting the component from context().page():
theParentContainer = (RVHotelDetailMain)context().page();
//DEBUG
if (theParentContainer == null)
System.out.println("theParentContainer IS NULL");
else
System.out.println("theParentContainer IS NOT NULL");
System.out.println("theParentContainer: " +
theParentContainer.name());
//END DEBUG
This prints out:
theParentContainer IS NOT NULL
theParentContainer: RVHotelDetailMain
But... Then I try to print a string from 'theHotelItem', which is a
public variable in RVHotelDetailMain.
I get this exception:
[2004-04-23 22:57:43 PDT] <WorkerThread3>
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:
[<RVHotelDetailNightlife name: RVHotelDetailNightlife subcomponents:
null > valueForKey()]: lookup of unknown key: 'theHotelItem'.
This WOComponent does not have an instance variable of the name
theHotelItem or _theHotelItem, nor a method of the name theHotelItem,
_theHotelItem, getTheHotelItem, or _getTheHotelItem
So... What am I doing wrong? It seems I am getting the correct
component but I can't print values??
Calls to print variables from 'theHotelItem' work fine inside the
parent component. They only fail in the sub-component.
If I am going about this the wrong way, please let me know.
Thanks,
Hunter
_______________________________________________
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.