You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2004/07/03 05:29:48 UTC

The Pager in Provided by the jsptags.com

I am trying to use the paging provide by
http://jsptags.com/tags/navigation/pager

I got an error: This absolute uri
(http://jsptags.com/tags/navigation/pager) cannot be
resolved in either web.xml or the jar files deployed
with this application'

What uri string does the pager expect?  What should I
put in the web.xml to use this pager?  
I set  url="org/myOrg/myProj/message/ListThreads"
and ListThreads.java is an action servlet that
retrieves a list to be displayed from the database.

What I did is:

1. in the beginning of my JSP, there is:
[code]
<%@ taglib
uri="http://jsptags.com/tags/navigation/pager"
prefix="pg" %>
[/code]

2. I have this segment of code in my JSP
[code]
<pg:pager
  url="org/myOrg/myProj/message/ListThreads"
  items="<c:out value="${totalThreads}" />"
  maxPageItems="20"
  isOffset="true"
  export="offset,currentPageNumber=pageNumber"
  scope="request">
<% String rowsType = "Number of Threads"; %>
<%-- keep track of preference --%>
<pg:param name="sort"/>
<pg:param name="order"/>
[/code]

where "totalThreads", "sort", "order" are defined this
way (the code has no problem if I do not use the
paging):
[code]
<c:set var="totalThreads"
value="${requestScope.TotalThreads}" />

   <html:form action="/message/ListThreads">
   Sort by
      <html:select size="1" property="sort"
value="thread_last_post_date"
onchange="document.forms[4].elements[2].focus()">
      <html:options collection="SORT" property="value"
labelProperty="label"/>
      </html:select>
   Order
      <html:select size="1" property="order"
value="DESC"
onchange="document.forms[5].elements[2].focus()">
      <html:options collection="ORDER"
property="value" labelProperty="label"/>
      </html:select>
   <input type="button" value="Go"
onclick="disabled=true; submit();">
   </html:form>
[/code]




		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: The Pager in Provided by the jsptags.com

Posted by Jorge Salido <js...@gmail.com>.
Put in web.xml a reference to your local .tld file, like this:

    <taglib>
        <taglib-uri>/WEB-INF/pager-taglib.tld</taglib-uri>
        <taglib-location>/WEB-INF/pager-taglib.tld</taglib-location>
    </taglib>

And in your jsp header use the taglib-uri value:
<%@ taglib uri="/WEB-INF/pager-taglib.tld" prefix="pg" %>

It should work. BTW, I recall items that are going to be shown in
pages should be in <pg:item> tags.

Jorge


On Fri, 2 Jul 2004 20:29:48 -0700 (PDT), Caroline Jen
<ji...@yahoo.com> wrote:
> I am trying to use the paging provide by
> http://jsptags.com/tags/navigation/pager
> 
> I got an error: This absolute uri
> (http://jsptags.com/tags/navigation/pager) cannot be
> resolved in either web.xml or the jar files deployed
> with this application'
> 
> What uri string does the pager expect?  What should I
> put in the web.xml to use this pager?
> I set  url="org/myOrg/myProj/message/ListThreads"
> and ListThreads.java is an action servlet that
> retrieves a list to be displayed from the database.
> 
> What I did is:
> 
> 1. in the beginning of my JSP, there is:
> [code]
> <%@ taglib
> uri="http://jsptags.com/tags/navigation/pager"
> prefix="pg" %>
> [/code]
> 
> 2. I have this segment of code in my JSP
> [code]
> <pg:pager
>   url="org/myOrg/myProj/message/ListThreads"
>   items="<c:out value="${totalThreads}" />"
>   maxPageItems="20"
>   isOffset="true"
>   export="offset,currentPageNumber=pageNumber"
>   scope="request">
> <% String rowsType = "Number of Threads"; %>
> <%-- keep track of preference --%>
> <pg:param name="sort"/>
> <pg:param name="order"/>
> [/code]
> 
> where "totalThreads", "sort", "order" are defined this
> way (the code has no problem if I do not use the
> paging):
> [code]
> <c:set var="totalThreads"
> value="${requestScope.TotalThreads}" />
> 
>    <html:form action="/message/ListThreads">
>    Sort by
>       <html:select size="1" property="sort"
> value="thread_last_post_date"
> onchange="document.forms[4].elements[2].focus()">
>       <html:options collection="SORT" property="value"
> labelProperty="label"/>
>       </html:select>
>    Order
>       <html:select size="1" property="order"
> value="DESC"
> onchange="document.forms[5].elements[2].focus()">
>       <html:options collection="ORDER"
> property="value" labelProperty="label"/>
>       </html:select>
>    <input type="button" value="Go"
> onclick="disabled=true; submit();">
>    </html:form>
> [/code]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: The Pager in Provided by the jsptags.com

Posted by javen fang <fa...@yahoo.com.cn>.
hi, i seems that the new struts user mailing list is:

user@struts.apache.org



--- Caroline Jen <ji...@yahoo.com> wrote:
> I am trying to use the paging provide by
> http://jsptags.com/tags/navigation/pager
> 
> I got an error: This absolute uri
> (http://jsptags.com/tags/navigation/pager) cannot be
> resolved in either web.xml or the jar files deployed
> with this application'
> 
> What uri string does the pager expect?  What should
> I
> put in the web.xml to use this pager?  
> I set  url="org/myOrg/myProj/message/ListThreads"
> and ListThreads.java is an action servlet that
> retrieves a list to be displayed from the database.
> 
> What I did is:
> 
> 1. in the beginning of my JSP, there is:
> [code]
> <%@ taglib
> uri="http://jsptags.com/tags/navigation/pager"
> prefix="pg" %>
> [/code]
> 
> 2. I have this segment of code in my JSP
> [code]
> <pg:pager
>   url="org/myOrg/myProj/message/ListThreads"
>   items="<c:out value="${totalThreads}" />"
>   maxPageItems="20"
>   isOffset="true"
>   export="offset,currentPageNumber=pageNumber"
>   scope="request">
> <% String rowsType = "Number of Threads"; %>
> <%-- keep track of preference --%>
> <pg:param name="sort"/>
> <pg:param name="order"/>
> [/code]
> 
> where "totalThreads", "sort", "order" are defined
> this
> way (the code has no problem if I do not use the
> paging):
> [code]
> <c:set var="totalThreads"
> value="${requestScope.TotalThreads}" />
> 
>    <html:form action="/message/ListThreads">
>    Sort by
>       <html:select size="1" property="sort"
> value="thread_last_post_date"
> onchange="document.forms[4].elements[2].focus()">
>       <html:options collection="SORT"
> property="value"
> labelProperty="label"/>
>       </html:select>
>    Order
>       <html:select size="1" property="order"
> value="DESC"
> onchange="document.forms[5].elements[2].focus()">
>       <html:options collection="ORDER"
> property="value" labelProperty="label"/>
>       </html:select>
>    <input type="button" value="Go"
> onclick="disabled=true; submit();">
>    </html:form>
> [/code]
> 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org