Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Santosh Urs

Greenhorn
+ Follow
since Jun 25, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Santosh Urs

Hi ,
I'm using Struts 1.1 to build a search engine
Based on the Search result (dynamic) i want to build a tree structure ( 10 words ) per page ( includes pagination)

This is Action Class code..

if (query != null ) {

AgrovocBrowsing conInd = new AgrovocBrowsing();
//int hcount = conInd.getHcount(query);
//log.debug(" Hit length in ViewDefinitionAction : "+ hcount);
List<AgrovocResDoc> agrovoc = new ArrayList<AgrovocResDoc>();
try {
agrovoc = conInd.retrieveAgrovocs(query, se,request);
} catch (Exception e1) {
e1.printStackTrace();
}

if (agrovoc != null && agrovoc.size() != 0) {

session.setAttribute("agrovoc", agrovoc);
}
}

In JSP for tree structure i used "Struts-improve" <layout.treeview> tag lib

Now tree structure is coming fine , now i want add paging (pagination) for this...how to add paging..

this is JSP code..

<table align="left" >
<tr class="broaderterms">
<td valign="top">


<layout:treeview >
<logic resent name="agrovoc" >
<logic:iterate id="agrovoc" name="agrovoc" scope="session">
<c:set var="term" value="${agrovoc.AGTerm}" />
<c:set var="bterm" value="${agrovoc.AGBTerm}" />
<c:set var="nterm" value="${agrovoc.AGNTerm}" />
<c:set var="rterm" value="${agrovoc.AGRTerm}" />
<c:set var="nuri" value="${agrovoc.AGNURI}" />
<c:set var="ruri" value="${agrovoc.AGRURI}" />

<layout:menuItem key="${agrovoc.AGURI}" link="#" >

<logic:notEmpty name="bterm">
<layout:menuItem key="BroaderTerms">
<layout:menuItem key="${agrovoc.AGBURI}" link="#"/>
</layout:menuItem>
</logic:notEmpty>

<logic:notEmpty name="nterm">
<layout:menuItem key="NarrowerTerms">
<logic:iterate id="nuri" name="nuri">
<layout:menuItem key="${nuri}" link="#" />
</logic:iterate>
</layout:menuItem>
</logic:notEmpty>

<logic:notEmpty name="rterm">
<layout:menuItem key="RelatedTerms">
<logic:iterate id="ruri" name="ruri">
<layout:menuItem key="${ruri}" link="#" />
</logic:iterate>
</layout:menuItem>
</logic:notEmpty>

</layout:menuItem>

</logic:iterate>
</logic resent>
</layout:treeview>






</td>
</tr>


<layout ager> doesn't work with <layout:treeview> tag... Any other way to implement paging for this....?
12 years ago