james,
thanks for your response.
do you know if your tag lib works w/ Weblogic? if i get a
NullPointerException error does this mean i have a problem w/ my syntax or
am i not configuring the tag on the server correctly?
i basically copied the Jar file to my "lib" directory that's in my startup
path. what else do i need to do? (sorry for such a basic question but this
is the first time for me to try a custom tag outside of what this group is
already using and i'm new to weblogic sever config issues.)
here's my syntax so far:
***********************************************************************
<%@ taglib uri="lib/pager-taglib-1.0.jar" prefix="pg" %>
...other import stuff
<!-- es: prepare sql and process -->
<es:preparedstatement id="ps" sql="<%=sSQL%>" pool="portal">
<%
//query: execute
java.sql.ResultSet rs = ps.executeQuery();
//query: get column count
ResultSetMetaData metadata = rs.getMetaData();
int cols = metadata.getColumnCount();
int row = 1;
%>
...other query stuff
<%
//pager tag: build table index
%>
<table border="1" width="90%">
<!-- pager tag: prepare page table -->
<pg:pager >
<!-- pager index tag: -->
<pg:index>
<!-- html: tags -->
<center>
<table>
<tr align=center valign=top>
<td valign=top>
Result Page:
</td>
<!-- pager prev tag: -->
<pg:prev ifnull="true">
<% if (pageUrl!=null){%>
<td> <a
href="<%=pageUrl%>">Previous</a></td>
<%}else{%>
<td>Previous</td>
<%}%>
</pg:prev><!-- end pager prev tag
-->
</tr>
</table>
</center>
....other pager tag stuff
</pg:index><!-- end pager index tag -->
</pg:pager><!-- end pager tag -->
<%
...other jsp stuff
%>
</es:preparedstatement>
***********************************************************************
-----Original Message-----
From: James Klicman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 11, 2000 10:28 PM
To: [EMAIL PROTECTED]
Subject: Re: jsp to oracle technique: paging display of large recordsets
I've used it. :-)
By looping data source I mean any loop construct (JSP Tag or Java based)
that can be used to generate data. In the examples, the tag
<ex:searchresults></ex:searchresults> would evaluate the body content
of the tag for each search result that it contains.
The loop can also be any Java loop construct (for, while, do). The
following
is the loop code for the pager demo.
<table width="90%" cellspacing="4" cellpadding="4">
<% for (int i = 0; i < webPalette.length; i++) { %>
<pg:item>
<tr><th bgcolor="<%= webPalette[i][0] %>"><font color="<%=
webPalette[i][1] %>">
<%= i + 1 %></font></th></tr>
</pg:item>
<% } %>
</table>
Here is very simple loop:
<% for (int i = 0; i < 100; i++) { %>
<pg:item><%= i %></pg:item>
<% } %>
Also, David's explanation is exactly right.
-James Klicman <[EMAIL PROTECTED]>
On Thu, 11 May 2000, David Edmister wrote:
> john,
> i'm looking at the same thing right now to see if i can use it and i'll
> report back to you. but what it looks like is that anything in that
example
> w/ an "ex:" tag is a custom tag call to the database to prepare a
recordset.
> so, you need to do your own database call, as ypu normally would (whether
> your using a JSP library or your own jsp code for normal database
> operations), and then integrate the "pager" taglib into the page w/ the
> recordset. i agree, it's a little nebulous now but i'm sure it'll sort
> itself out after a little practice.
>
> i'll see how far with it i geat and give you and example.
>
> anybody else who has used the "pager" tag, please help out. thanks!
>
> -----Original Message-----
> From: John Cartwright [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 11, 2000 3:05 PM
> To: [EMAIL PROTECTED]
> Subject: Re: jsp to oracle technique: paging display of large recordsets
>
>
> This looks like a very elegant solution, but I'm afraid that the example
> is not basic enough for me. What is meant by a "looping data source"?
> It looks like another taglib is being used, but I don't see any other
> reference to it.
>
> Thanks for any help or clarification!
>
> --john
>
> Kent Symanzik wrote:
> >
> > You could also use the pager taglib which can be found at
> > http://jsptags.com/tags
> >
> > This taglib gives you next, prev and page links. Although, it is a more
> > involved solution but it comes with very good examples of how to use it.
> >
> > Kent
>
> --
>
============================================================================
> ===
> John Cartwright
> Professional Research Assistant / Associate Scientist
> CIRES, SEG/NGDC/NOAA
> (303) 497-6284
> [EMAIL PROTECTED]
>
============================================================================
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets