저는 JSP에 익숙하지 않고 내보내기 기능을위한 표시 태그에 관심이 있습니다. 말, 나는이 간단한 구조를 가지고 :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>
그래서를, 기본적으로 내가 원하는 계정을 반복하고 모든 금융 기관을 확보하십시오. displaytag를 사용하여 JSP에서이를 수행하는 방법을 알지 못합니다. c : forEach 및 display : setProperty 태그를 사용하려고했지만이 태그가 이러한 용도로 사용되지 않는 것 같습니다. 나는 치명적인 붙어 :(
사전 : 당신은 JSP에서 작업을 할 필요가 없습니다
안녕하세요. 회신 해 주셔서 대단히 감사합니다. 그러나 이것은 작동하지 않습니다. 이유는, 여러 개의 열이있을 것입니다 (두 개만 언급했지만 그 이상이 있습니다). 그리고 JSP를 통해이를 수행해야합니다. – user1039063