Hi All,
i need to display a list of Objects, which inturn will have other list.
code is as follows
BalanceSheetBean
import java.util.*;
public class BalanceSheetBean
{
String accCode;
String accName;
List<Fund> fund;
public BalanceSheetBean() {
this.accCode = "";
this.accName = "";
}
public void setAccCode(String accCode) {
this.accCode = accCode;
}
public String getAccCode() {
return accCode;
}
public void setAccName(String accName) {
this.accName = accName;
}
public String getAccName() {
return accName;
}
public List<Fund> getFund() {
if (fund == null) {
fund = new ArrayList<Fund>();
}
return this.fund;
}
}
Fund
import java.util.*;
public class BalanceSheetBean
{
String accCode;
String accName;
List<Fund> fund;
public BalanceSheetBean() {
this.accCode = "";
this.accName = "";
}
public void setAccCode(String accCode) {
this.accCode = accCode;
}
public String getAccCode() {
return accCode;
}
public void setAccName(String accName) {
this.accName = accName;
}
public String getAccName() {
return accName;
}
public List<Fund> getFund() {
if (fund == null) {
fund = new ArrayList<Fund>();
}
return this.fund;
}
}
Fund
package com.exilant.eGov.src.reports;
public class Fund
{
String currAmount;
String fundId;
public void setFundId(String fundId) {
this.fundId = fundId;
}
public String getFundId() {
return fundId;
}
public void setCurrAmount(String currAmount) {
this.currAmount = currAmount;
}
public String getCurrAmount() {
return currAmount;
}
}
jsp code is as follows
}
public void setCurrAmount(String currAmount) {
this.currAmount = currAmount;
}
public String getCurrAmount() {
return currAmount;
}
}
jsp code is as follows
<% BalanceSheetReport bsReport = new BalanceSheetReport();
request.setAttribute("repo",bsReport.getBSReport());
// "bsReport.getBSReport()" retuns collection of BalanceSheetBean
objects
%>
<display:table name="repo" uid="currentRowObject" export="true"
sort="list" pagesize = "26" class="its" id="testit" >
<display:caption>
<u><center><b><div class = "normaltext">Balance Sheet As on Date
<%=
request.getParameter("endDate") %></div></b></center></u>
</display:caption>
<display:column property="accCode" title="Code"/>
<display:column property="accName" title="Name"/>
<display:column property="schNo" title="Schedule"/>
<display:column property="balanceSheetBean.fund" title="Funds" />
<display:setProperty name="basic.empty.showtable" value="true" />
<display:setProperty name="export.pdf" value="true" />
</display:table>
Thanks in advance
Regards
Tilak
Regards
Tilak
Yahoo! India Answers: Share what you know. Learn something new. Click here
Send instant messages to your online friends - NOW

