Re: newbie: basic question on getting a value from an entity
Re: newbie: basic question on getting a value from an entity
- Subject: Re: newbie: basic question on getting a value from an entity
- From: Paul Marvine <email@hidden>
- Date: Sun, 4 Mar 2007 11:47:49 -0600
Thank you Chuck.
You, of course, were correct.
For other newbies, like me, Bruce Eckel's Thinking in Java is free at
http://www.mindviewinc.com/
Paul
On Mar 3, 2007, at 8:31 PM, Chuck Hill wrote:
Paul,
I think that what you need is a good book on Java. Bruce Eckel's
Thinking in Java is one that I would highly recommend.
On Mar 3, 2007, at 2:42 PM, Paul Marvine wrote:
I am using pagesDisplayGroup.selectedObject() successfully in
other actions of the page.
Also, on the page I have a WOtextField with value =
pagesDisplayGroup.selectedObject.pageTemplate
that shows the data which I am trying to use. So selectedObject()
is not null and the attribute "pageTemplate" has some data in it.
I can display the field on the page, but how do I call the same
data in an action?
String desiredComponent = pagesDisplayGroup.selectedObject
().pageTemplate(); doesn't seem to work.
This is the definition of selectedObject():
public Object selectedObject()
The Object class does not have a method named pageTemplate() and
Java does not guess. You need to tell it what kind of object you
are expecting selectedObject() to return:
String desiredComponent = ((NameOfClassThatImplementsPageTemplate)
pagesDisplayGroup.selectedObject ()).pageTemplate();
Chuck
_______________________________________________
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