Hello to everyone, I hope you are doing fine today in all of your tasks.
I have a question about implementing a nested tables in displaytag. I am using:
Appfuse 1.9.4 and webwork
Displaytag 1.1
The problem is like this, I have a pojo named StudyPageSet that has a member of
Set of StudyPages:
public class StudyPageSet extends BaseModel {
private Set<StudyPage> studyPages = new TreeSet();
//getters and setters
}
I need to make a table using displaytag w/c is the last column of that table
has also a table of StudyPage for every row. I made a code like this in my
action:
private Set spSet = new TreeSet();
//getters and setters
public String edit() {
....
spSet = study.getStudyPageSets();
return SUCCESS;
}
and I used the spSet in my displaytag. From the table, I can retrieve my
StudyPageSets but I cannot retrieve the StudyPages in the table of my last
column.
>From
>http://displaytag.homeip.net/displaytag-examples-1.1/example-nestedtables.jsp.source
> , the sample used a List while I am using a Set.
Here are my jsp code:
<ww:set name="spSet" value="spSet" scope="request"/>
<display:table name="spSet" cellspacing="0" cellpadding="0" requestURI=""
style="width: 100%"
id="spSet" pagesize="<%=pageSize%>" class="table" export="false"
decorator="genericDecorator" >
.......
<c:set var="studyPageSubset" value="XXXXXXX" />
<display:column titleKey="page.studyPage" escapeXml="false"
sortable="true" style="text-align:center;">
<display:table name="${studyPageSubset}" id="studyPageSubset">
<display:column property="description" escapeXml="true"
sortable="true" titleKey="page.description" maxLength="50"/>
...........
</display:table>
</display:column>
</display:table>
>From my action, I can retrieve the set of StudyPages using this:
spSet = study.getStudyPageSets();
//study.getStudyPageSets().iterator().next().getStudyPages();
but when I used "spSet.iterator.next.studyPages" in the "XXXXXXX", I still
cannot retrieve them.
I also tried to put study.getStudyPageSets().iterator().next().getStudyPages()
in a variable from my action but the result is the same.
What should I put in the "XXXXXXX" to get the set of StudyPages? Or did I do
wrong in my codes?
Your kind replies are very much appreciated. Thank you and God bless you.
Adriel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]