Re: binding 'displayString' to combined columns...
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