I am new to the use of DisplayTag. I am trying to evaluate this product to see if we can use it in the next phase of our project.
I just downloaded the WAR file and I'm looking specifically at the pagination functionality.
We have 2 questions:
Is it possible to modify the navigation? To be more specific, instead of having text for the FIRST/PREVIOUS and NEXT/LAST text can we exchange for the following text "<< <" 1, 2, 3, ..."> >>" respectively?
Within the table, is it possible to have 2 lines displayed? In our resultset some of the records may have a DESCRIPTION FIELD that should go on the second line of a record in the table.
Any help would be greatly appreciated.
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
About displaying 2 lines, you can do it but with jstl help, I mean id you give an identificator to your table, you can access all your fields from that id. I mean if my <display:table id="id" ....
then I will be able to acess:
<display:column ...>
<c:out value="${id.field1}"/>
<c:out value="${id.field2}"/>
</display:column>
I hope this helps you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However, my problem is when the page first loads it still has the FIRST/PREV text instead of the text and then the 2nd - 3rd page gives me the change I put in the paging.banner.full setting but then on the 4th page it goes back to the NEXT/LAST text again.
Can someone please tell me what I'm doing wrong. Any help or insight would be greatly appreciated.
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried asking this question before but I got no response on another thread.
I thought I'd try it here for a response since I got a response above.
I am needing to move the display tag properties around on the web form like the following:
X items found, displaying X to X above the display table
left-justify.
paging.banner.full, paging.banner.first, paging.banner.last
should be moved above the displaytag table and right-justify.
3.paging.banner.full, paging.banner.first, paging.banner.last
should be moved below the displaytag table and centered under the table.
Questions:
a. Can I break up the count from the navigation?
b. If the answer to (a) is YES, is there a way to put the record count LEFT JUSTIFY and the navigation RIGHT JUSTIFY on one <tr></tr>
and then just put the navigation on the BOTTOM without the record count?
Any help or direction would be greatly appreciated. THANK YOU!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am new to the use of DisplayTag. I am trying to evaluate this product to see if we can use it in the next phase of our project.
I just downloaded the WAR file and I'm looking specifically at the pagination functionality.
We have 2 questions:
Is it possible to modify the navigation? To be more specific, instead of having text for the FIRST/PREVIOUS and NEXT/LAST text can we exchange for the following text "<< <" 1, 2, 3, ..."> >>" respectively?
Within the table, is it possible to have 2 lines displayed? In our resultset some of the records may have a DESCRIPTION FIELD that should go on the second line of a record in the table.
Any help would be greatly appreciated.
Regards.
Please disregard my earlier question. With the help of David Friedman from the Stripes group my question has been answered and my problem resolved.
Regards.
Hi!
to modify the navigation take a llok at the configuration file displaytag.properties. In this file you can change all the text. take a look at this: http://displaytag.sourceforge.net/11/configuration.html
About displaying 2 lines, you can do it but with jstl help, I mean id you give an identificator to your table, you can access all your fields from that id. I mean if my <display:table id="id" ....
then I will be able to acess:
<display:column ...>
<c:out value="${id.field1}"/>
<c:out value="${id.field2}"/>
</display:column>
I hope this helps you!
Thanks so much for the response.
I imported the displaytags.properties file into the WEB-INF/classes directory so that I could modify the text in the paging.banner:
paging.banner.full=<span class="pagelinks">[<a href="{1}">First</a>/<a href="{2}">Prev</a>] {0} [<a href="{3}">Next</a>/<a href="{4}">Last</a>]</span>
paging.banner.full=<span class="pagelinks">[<a href="{1}"><<</a>/<a href="{2}"><</a>] {0} [<a href="{3}">></a>/<a href="{4}">>></a>]</span>
paging.banner.first=<span class="pagelinks">[First/Prev] {0} [<a href="{3}">Next</a>/<a href="{4}">Last</a>]</span>
paging.banner.last=<span class="pagelinks">[<a href="{1}">First</a>/<a href="{2}">Prev</a>] {0} [Next/Last]</span>
paging.banner.onepage=<span class="pagelinks">{0}</span>
However, my problem is when the page first loads it still has the FIRST/PREV text instead of the text and then the 2nd - 3rd page gives me the change I put in the paging.banner.full setting but then on the 4th page it goes back to the NEXT/LAST text again.
Can someone please tell me what I'm doing wrong. Any help or insight would be greatly appreciated.
Regards.
Use properties this way:
paging.banner.full=<span class="pagelinks">[<a href="{1}"><<</a>/<a href="{2}"><</a>] {0} [<a href="{3}">></a>/<a href="{4}">>></a>]</span>
paging.banner.first=<span class="pagelinks"> {0} [<a href="{3}">Next</a>/<a href="{4}">Last</a>]</span>
paging.banner.last=<span class="pagelinks">[<a href="{1}">First</a>/<a href="{2}">Prev</a>] {0} </span>
Thanks so much for the response. Can you please tell me how I can 'center' the paging:banner as you have denoted above?
Thanks again for your help.
Regards.
I tried asking this question before but I got no response on another thread.
I thought I'd try it here for a response since I got a response above.
I am needing to move the display tag properties around on the web form like the following:
X items found, displaying X to X above the display table
left-justify.
paging.banner.full, paging.banner.first, paging.banner.last
should be moved above the displaytag table and right-justify.
3.paging.banner.full, paging.banner.first, paging.banner.last
should be moved below the displaytag table and centered under the table.
Questions:
a. Can I break up the count from the navigation?
b. If the answer to (a) is YES, is there a way to put the record count LEFT JUSTIFY and the navigation RIGHT JUSTIFY on one <tr></tr>
and then just put the navigation on the BOTTOM without the record count?
Any help or direction would be greatly appreciated. THANK YOU!!