You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Varun Deep <vd...@ygconsultants.com> on 2008/08/17 06:57:39 UTC
Display tag : how to format the page number, Please help
Hello to all
I am using the display tag to show the employee data , it showing the
page banner in the following style.
"25 items found, displaying 1 to 10 [first] [previous] 1 2 3
[next][last]"
I want give it a look of google page banner or any aother type as we see
in the many sites.
For the I modified the displaytag.properties file and include the
following .
paging.banner.full=<div class="pagelinks" align="right"><a href={1}><img
src=" images/first.gif"></a><a href={2}><img src="
images/prev.gif"></a>{0}<a href={3}><img src=" images/next.gif"></a><a
href={4}><img src=" images/last.gif"></a></div>
paging.banner.first=<div class="pagelinks" align="right"><a
href={1}><img
src="images/first.gif"></a><a href={2}><img
src="images/previous.gif"></a> {0}
<a href={3}><img src="static/images/next.gif"></a><a href={4}><img
src="images/last.gif"></a></div>
paging.banner.last=<div class="pagelinks" align="right"><a href={1}><img
src="images/first.gif"></a><a href={2}><img
src="images/previous.gif"></a> {0}
<a href={3}><img src="images/next.gif"></a><a href={4}><img
src="images/last.gif"></a></div>
export.banner=<div class="pagelinks" align="right">{0}</div>
please help me
thanks in advance
RE: Display tag : how to format the page number, Please help
Posted by Martin Gainty <mg...@hotmail.com>.
you are trying to populate a href based on a call to a action class passing a different locale param
<ul>
<li><a href="<s:url action="Welcome?request_locale=en"/>">English</a></li>
<li><a href="<s:url action="Welcome?request_locale=ja"/>">Japanese</a></li>
<li><a href="<s:url action="Welcome?request_locale=ru"/>">Russian</a></li>
<li><a href="<s:url action="Welcome?request_locale=in"/>">Indian</a></li>
<li><a href="<s:url action="Welcome?request_locale=cn"/>">Chinese</a></li>
<li><a href="<s:url action="Welcome?request_locale=de"/>">German</a></li>
<li><a href="<s:url action="Welcome?request_locale=fr"/>">French</a></li>
</ul>
The URL tag isn't meant to be used with a query string. The best way to write this would be:
Use the param tag instead
<s:url action="Welcome">
<s:param name="request_locale" value="en" />
<s:param name="request_locale" value="ja" />
<s:param name="request_locale" value="cn" />
<s:param name="request_locale" value="in" />
<s:param name="request_locale" value="de" />
<s:param name="request_locale" value="fr" />
</s:url>
http://struts.apache.org/2.0.11.2/docs/why-are-request-parameters-appended-to-our-hyperlinks.html
HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Mon, 8 Sep 2008 10:27:01 +1000
> Subject: Re: Display tag : how to format the page number, Please help
> From: zoran@sparecreative.com
> To: user@struts.apache.org; vdeep@ygconsultants.com
>
> I don¹t understand. Is it not working?
>
> We¹re often customising the displaytag properties file and it works fine.
>
> Z.
> >
> > Hello to all
> >
> > I am using the display tag to show the employee data , it showing the
> > page banner in the following style.
> > "25 items found, displaying 1 to 10 [first] [previous] 1 2 3
> > [next][last]"
> >
> > I want give it a look of google page banner or any aother type as we see
> > in the many sites.
> > For the I modified the displaytag.properties file and include the
> > following .
> >
> > paging.banner.full=<div class="pagelinks" align="right"><a href={1}><img
> > src=" images/first.gif"></a><a href={2}><img src="
> > images/prev.gif"></a>{0}<a href={3}><img src=" images/next.gif"></a><a
> > href={4}><img src=" images/last.gif"></a></div>
> >
> > paging.banner.first=<div class="pagelinks" align="right"><a
> > href={1}><img
> > src="images/first.gif"></a><a href={2}><img
> > src="images/previous.gif"></a> {0}
> > <a href={3}><img src="static/images/next.gif"></a><a href={4}><img
> > src="images/last.gif"></a></div>
> >
> > paging.banner.last=<div class="pagelinks" align="right"><a href={1}><img
> > src="images/first.gif"></a><a href={2}><img
> > src="images/previous.gif"></a> {0}
> > <a href={3}><img src="images/next.gif"></a><a href={4}><img
> > src="images/last.gif"></a></div>
> > export.banner=<div class="pagelinks" align="right">{0}</div>
> >
> > please help me
> >
> > thanks in advance
> >
>
>
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
Re: Display tag : how to format the page number, Please help
Posted by Zoran Avtarovski <zo...@sparecreative.com>.
I don¹t understand. Is it not working?
We¹re often customising the displaytag properties file and it works fine.
Z.
>
> Hello to all
>
> I am using the display tag to show the employee data , it showing the
> page banner in the following style.
> "25 items found, displaying 1 to 10 [first] [previous] 1 2 3
> [next][last]"
>
> I want give it a look of google page banner or any aother type as we see
> in the many sites.
> For the I modified the displaytag.properties file and include the
> following .
>
> paging.banner.full=<div class="pagelinks" align="right"><a href={1}><img
> src=" images/first.gif"></a><a href={2}><img src="
> images/prev.gif"></a>{0}<a href={3}><img src=" images/next.gif"></a><a
> href={4}><img src=" images/last.gif"></a></div>
>
> paging.banner.first=<div class="pagelinks" align="right"><a
> href={1}><img
> src="images/first.gif"></a><a href={2}><img
> src="images/previous.gif"></a> {0}
> <a href={3}><img src="static/images/next.gif"></a><a href={4}><img
> src="images/last.gif"></a></div>
>
> paging.banner.last=<div class="pagelinks" align="right"><a href={1}><img
> src="images/first.gif"></a><a href={2}><img
> src="images/previous.gif"></a> {0}
> <a href={3}><img src="images/next.gif"></a><a href={4}><img
> src="images/last.gif"></a></div>
> export.banner=<div class="pagelinks" align="right">{0}</div>
>
> please help me
>
> thanks in advance
>