Re : GSP Tag

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re : GSP Tag

Beaur, Remi
Hi,

OK your answer confirms what I had read and understood about this tag on
the site :

    <g:select optionKey="id" from="${Project.list()}" name='project.id'
    value='${projectUserRelation?.project?.name}'></g:select>

calls "toString()" and does not display the "id" but something like
"Project@11b4521". I have already tried the 2 solutions proposed to
display the "name" field :
    - implementing a new "toString" : works but it's not exactly what I
want,
    - using "OptionValue" like this :

    <g:select optionKey="id" from="${Project.list()}" name='project.id'
optionValue='${projectUserRelation?.project?.name}'></g:select>

should do what I want (it's exactly what 's in my code since the
beginning) but it doesn't work (still displaying stuff like "Project@...").

Thanks for your help,

Rémi Béaur


Reply | Threaded
Open this post in threaded view
|

Re: Re : GSP Tag

graemer
On 4/19/06, Beaur, Remi <[hidden email]> wrote:

> Hi,
>
> OK your answer confirms what I had read and understood about this tag on
> the site :
>
>     <g:select optionKey="id" from="${Project.list()}" name='project.id'
>     value='${projectUserRelation?.project?.name}'></g:select>
>
> calls "toString()" and does not display the "id" but something like
> "Project@11b4521". I have already tried the 2 solutions proposed to
> display the "name" field :
>     - implementing a new "toString" : works but it's not exactly what I
> want,
>     - using "OptionValue" like this :
>
>     <g:select optionKey="id" from="${Project.list()}" name='project.id'
> optionValue='${projectUserRelation?.project?.name}'></g:select>
>
> should do what I want (it's exactly what 's in my code since the
> beginning) but it doesn't work (still displaying stuff like "Project@...").
Right ok, could you possibly file an issue on JIRA?

Thanks
Graeme
>
> Thanks for your help,
>
> Rémi Béaur
>
>
>