Hi folks,
Im trying to build an enhancement to my web app, by including pagination to 
diplay the results of a query in the jsp. I ve tried using the diplay tag 
library to implement the same .Before using the display tag library , I was 
just printing the List by using jstl tags and EL , something of the nature 
below.
[code=java]
<TABLE WIDTH="75%" BORDER="1">
 <TR>

  <TD>Code</TD>
  <TD>Description</TD>
  <TD>IsActive?</TD>
  <TD>IsEditable?</TD>
  <TD>Edit</TD>
  <TD></TD>

  <c:forEach items="${dao.domList}" var="dl">

   <TR>
    <TD><c:out value="${dl.code}" /></TD>
    <TD><c:out value="${dl.description}" /></TD>
    <TD><c:out value="${dl.statusActive}" /></TD>
    <TD><c:out value="${dl.statusEdit}" /></TD>
    <TD><a href="Main.jsp?${dl.objid}" onclick="selectobjID(${dl.objid})">Edit 
</a>  </TD>
   </TR>
  </c:forEach>




 </TR>
</TABLE>
[/code]
which shows the following output
Code Description IsActive? IsEditable? Edit  
SINGLE  FEMALE   Yes   No   Edit  
SINGLE  MALE   Yes   No   Edit  
MARRIED MALE           Yes   Yes          Edit  
where 'Edit' is a hyper link.


I did look at a couple of samples of display tag library and modified my code 
to the following.
[code=java]
<TABLE WIDTH="75%" BORDER="1">
 <TR>

  <TD>Code</TD>
  <TD>Description</TD>
  <TD>IsActive?</TD>
  <TD>IsEditable?</TD>
  <TD>Edit</TD>
  <TD></TD>
<%System.out.println("I think domList is being accessed");%>
  
   <display:table id="domList" name="${dao.domList}"pagesize="2">  
  <c:forEach items="${dao.domList}" var="dl">
   <TR>
    
      <TD> <display:column  value="${dl.code}" /> </TD>
          <TD><display:column  value="${dl.description }"/> </TD>
          <TD><display:column  value="${dl.statusActive }"/> </TD>
          <TD><display:column  value="${dl.statusEdit}"/> </TD>
                        <TD><a href="Main.jsp?${dl.objid}" 
onclick="selectobjID(${dl.objid})">Edit </a>  </TD>
     </TR>
   
  </c:forEach>
</display:table>  

 </TR>
</TABLE>
[/code]
However , now when I try to print the results, I get a weird output . As the 
records are repeated horizontally across the across the table defined in 
addition to the normal vertical listing.
also, the records are not listed accordint to the table structure that I have 
defined.
The output here is.
7 items found, displaying 1 to 2.[First/Prev] 1, 2, 3, 4 [Next/Last]  
Code Description IsActive? IsEditable? Edit 
SINGLE  FEMALE Yes No SINGLE MALE Yes No MARRIED MALE Yes Yes MARRIED FEMALE 
Yes Yes Married Male Yes No Married Female Yes No Married Female Yes No 
SINGLE  FEMALE Yes No SINGLE MALE Yes No MARRIED MALE Yes Yes MARRIED FEMALE 
Yes Yes Married Male Yes No Married Female Yes No Married Female Yes No 

And the hyper link associated with 'Edit' is not being displayed either :(.

Any help would be appreciated.
<font Face='Arial' style='font-size:9pt'>This e-mail, and any attachments are 
strictly confidential and may also contain legally privileged information. It 
is intended for the addressee(s) only. If you are not the intended recipient, 
please do not print, copy, store or act in reliance on the e-mail or any of its 
attachments. Instead, please notify the sender immediately and then delete the 
e-mail and any attachments.

Unless expressly stated to the contrary, the views expressed in this e-mail are 
not necessarily the views of Enzen Technologies (P) Limited or any of its 
subsidiaries or affiliates (Group Companies), and the Group Companies, their 
directors, officers and employees makes no representation and accept no 
liability for the accuracy or completeness of this e-mail. You are responsible 
for maintaining your own virus protection and the Group Companies do not accept 
any liability for viruses. Enzen reserves the right to monitor and review the 
content of all messages sent to or from this e-mail address. Messages sent to 
or from this e-mail address may be stored on the Enzen e-mail system.</font>


------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to