This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Struts1.1 ( TreeView & Paging)

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....?
Do you pee on your compost? Does this tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!