• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: newbie: basic question on getting a value from an entity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: newbie: basic question on getting a value from an entity (From: Paul Marvine <email@hidden>)
 >Re: newbie: basic question on getting a value from an entity (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: newbie: basic question on getting a value from an entity
  • Next by Date: Re: what to do with the <return> key
  • Previous by thread: Re: newbie: basic question on getting a value from an entity
  • Next by thread: newbie: basic question on getting a value from an entity
  • Index(es):
    • Date
    • Thread