Я новичок в jsp и заинтересован в теге отображения для его функциональности экспорта. Скажем, у меня есть эта простая структура:
public class MyActionBean implements ActionBean{
List<Country> countries;
// getters and setters and some other un-related logic
}
public class Country {
List<String> countryName;
List<Accounts> accounts;
// getters and setters and some other un-related logic
}
public class Accounts {
private FinancialEntity entity;
// getters and setters and some other un-related logic
}
public class FinancialEntity {
String entityName;
// getters and setters and some other un-related logic
}
Теперь я хочу создать таблицу, в которой будет два столбца: название страны и имя объекта (FinancialEntity).
<display:table id="row" name="${myActionBean.countries}" class="dataTable" pagesize="30" sort="list" defaultsort="8" export="true" requestURI="">
<display:column title="Country" sortable="true" group="1" property="countryName" />
<display:column title="Financial Entity"> somehow get all of the entity names associated with the country? </display:column>
</display:table>
Итак, по сути, я хочу перебрать счета и получить все финансовые объекты. Я не знаю, как это сделать в JSP с помощью displaytag. Пробовал использовать тэг c:forEach и display:setProperty, но похоже этот тэг не для этих целей. Я смертельно застрял :(
Заранее спасибо :)