• 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: binding 'displayString' to combined columns...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding 'displayString' to combined columns...


  • Subject: Re: binding 'displayString' to combined columns...
  • From: Q <email@hidden>
  • Date: Mon, 23 Mar 2009 09:01:33 +1000


On 22/03/2009, at 7:21 PM, Theodore Petrosky wrote:


I don't get this... I want to show the combined attributes from my entity in the displayString. What I want is:


displayString = "$theUser.firstName" + " " + "$theUser.lastName"

but of course this doesn't work. I feel i am missing something obvious but it isn't coming forth.

My entity has:

firstName
lastName

and I want to keep it normalized like this.

<wo:WOPopUpButton list = "$repList" displayString = "$theUser.firstName"
item = "$theUser" selection = "$theUser" />

You can use an ognl expression like "~theUser.firstName + ' ' + theUser.lastName" or since the chances of you wanting to do this more than once is quite high, you could add a fulName() method to your eo that returns the desired value and bind directly to 'theUser.fullName' instead.



-- Seeya...Q

Quinton Dolan - email@hidden
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806



_______________________________________________
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: 
 >binding 'displayString' to combined columns... (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: doubleValue and migrations
  • Next by Date: Re: binding 'displayString' to combined columns...
  • Previous by thread: Re: binding 'displayString' to combined columns...
  • Next by thread: Re: binding 'displayString' to combined columns...
  • Index(es):
    • Date
    • Thread