struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: Getting Value from Id in a LIst
Date Thu, 01 May 2014 15:35:52 GMT
If you only have an ID then you need to join the Country model; this seems
obvious.

You should do all that on the Java side to avoid the N+1 issue.

Dave



On Thu, May 1, 2014 at 10:58 AM, Antonio Sánchez <adsn37@gmail.com> wrote:

> Hello.
>
> Person CRUD.
>
> Person bean has name, age... and "countryId". Country bean has countryId
> and countryName.
>
> In persons.jsp all persons are listed, displaying rows for each person,
> and columns for name, age... but countryName must be displayed instead of
> countryId:
>
> <s:iterator value="persons">
>
> I can display countryId:
>
> <td><s:property value="countryId"/></td>
>
> But, how can I display countryName?
>
> Thanks.
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message