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

Santosh Urs

+ Follow
since Jun 25, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
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) {

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 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="#"/>

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

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


</logic resent>


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