Passing a value back to a subcomponent
Passing a value back to a subcomponent
- Subject: Passing a value back to a subcomponent
- From: "Lonie, Chris" <email@hidden>
- Date: Wed, 6 Feb 2008 21:01:31 -0500
- Thread-topic: Passing a value back to a subcomponent
I am trying to pass a value back to a WOComponent that is a subcomponent
but am not having any success.
I have an OrderItem WOComponent that has a findInventoryItem WOComponent
included on it. In the API, I pass the featureValue String field (of an
EOGenericRecord). The whole purpose of findInventoryItem is to set the
featureValue field. Naturally, when I stay within the code of
findInventoryItem, setting the featureValue works and the value is set
on the EOGenericRecord. However, when a method of findInventoryItem
sends the application onto a new screen, I can't get the value back to
findInventoryItem (or the EOGenericRecord).
The details: the SearchInventory action on findInventoryItem calls the
QueryCriteria WOComponent. From QueryCriteria, the app goes to
QueryResults and finally to InventoryItem. (Each its own screen.) On
the InventoryItem WOComponent, I want the Select action to set
featureValue in findInventoryItem (and on the EOGenericRecord) and
return the original OrderItem WOComponent. (I don't have any problem
returning to the original OrderItem WOComponent.)
I've tried passing the findInventoryItem WOComponent along and call a
set method in it to set the featureValue, but it didn't get back to the
EOGenericRecord.
I also tried passing the featureValue itself from findInventoryItem down
to InventoryItem but assigning the value within the Select action didn't
do it either.
I successfully created a get method in OrderItem to return the
EOGenericRecord and then call the setFeatureValue on the return from the
get method during the Select action on the InventoryItem screen, but it
doesn't seem like the best approach. (Especially since OrderItem is a
superclass and some subclasses will not have any findInventoryItems
while others will have one or more.)
Should one of my first two approaches work? Is there a better/right
way? Do I settle on the third and do a workaround for the issue of
multiple occurrences?
Thanks,
Chris
_______________________________________________
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