Re: binding 'displayString' to combined columns...
Re: binding 'displayString' to combined columns...
- Subject: Re: binding 'displayString' to combined columns...
- From: Theodore Petrosky <email@hidden>
- Date: Sun, 22 Mar 2009 16:20:55 -0700 (PDT)
Thanks this was perfect. I guess I now don't understand the difference escaping with the '$' or the '~'.
It works and I have bookmarked the reference you gave.
Ted
--- On Sun, 3/22/09, Q <email@hidden> wrote:
> From: Q <email@hidden>
> Subject: Re: binding 'displayString' to combined columns...
> To: "Theodore Petrosky" <email@hidden>
> Cc: email@hidden
> Date: Sunday, March 22, 2009, 7:01 PM
>
> 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