Yes, that the obvious way. Thank you.

But guess there is some situation where the view needs asking to the controller for some data passing some parameter. Although the example is not the best one, suppose PersonAction has Map<String, String> get Countries(), which is called in prepare(). Is there any syntax for retrieving the country name corresponding to the country id in each iteration?


El jue 01 may 2014 17:35:52 CEST, Dave Newton escribió:
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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to