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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Struts1.1 ( TreeView & Paging)

 
Greenhorn
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) {
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....?
 
Do you pee on your compost? Does this tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!