Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 09:38 AM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
[SOLVED] Display tag paging help..............?
Hi Members,

Im using display tag for my struts application, to show the pagination. But it is working perfect; I have set my page size as 15 rows per page and if the list im getting is less than '15 items' the paging text is shown as 'One item found. 1'
But i need to hide this display. If my list is greater than '15' then it can display the paging text. As i do not need the paging to be displayed if the list is leeser than the total page size.

If you are not able to understand me, i can explain more in detail.

Looking forward for your reply.

Regards,
Prabhu.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-24-2008, 09:58 AM
rjuyal's Avatar
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
in your jsp

Code:
<div class="pagelinks" align="right" id="insertHereTop"></div> <div class="pagelinks" align="right" id="insertHereBottom"></div>
Code:
insertNavigation ( 'insertHereTop', 'insertHereBottom' );
Code:
function insertNavigation( topElementID, BottomElementID ) { if ( document.getElementById('pagingBanner') ){ document.getElementById(topElementID).innerHTML=document.getElementById('pagingBanner').innerHTML; document.getElementById(BottomElementID).innerHTML=document.getElementById('pagingBanner').innerHTML; } }

is this what you wanted ?
__________________
i am the future
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-24-2008, 10:30 AM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
Hi Rjual,
Here is my sample code, and in this if i get the list size less than the 'pageSize' then i should not show any paging text, it should be hidden.

I could not get you what you were saying the previous post.

Quote:
<tr class=menuItemRowItm>
<td>

<% boolean flag = true; %>
<display:table name= "requestScope.getList" id="tttt" defaultorder= "ascending" requestURI= "some.action?fromDate=<%=fromDate%>&endDate=<%=end Date%>" pagesize="15" style= "width:100%; align: center;" >
<% String style = ( ( flag == false )? "table_row_background" : "table_row_alternate_background" ); %>
<display:column class="<%= style %>" style= "width=14%; PADDING-left: 3px; text-align: left;" property= "endedAt" format="{0,date,yyyy-MM-dd hh:mm:ss}" title= "Date Time" sortable= "true" />
<display:column class="<%= style %>" style= "width:24%; PADDING-left: 3px; text-align : left;" property= "xxx" title= "Group" sortable= "true" />
<display:column class="<%= style %>" style= "width:9%; PADDING-left: 3px; text-align : left;" property= "wwww" title= "Sub-Group" sortable= "true" />
<display:column class="<%= style %>" style= "width:10%; PADDING-left: 3px; text-align : left;" property= "ffff" title= "Test Case" sortable= "true" />
<display:column class="<%= style %>" style= "width:9%; PADDING-left: 3px; text-align : left;" property= "gggg" title= "Result" sortable= "true" />
<display:column class="<%= style %>" style= "width:34%; PADDING-left: 3px; text-align : left;" property= "rrrr" title= "Remarks" sortable= "true" />
<display:setProperty name="basic.empty.showtable" value="true" />
<% flag = !flag; %>

</display:table>
</td>
</tr>
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-24-2008, 10:35 AM
rjuyal's Avatar
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
in your displaytag.properties file
set style of all div to

style="display:none;"

For eg...

paging.banner.full=<div class="pagelinks" style="display:none;" ....


after that use my code.
__________________
i am the future
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-24-2008, 10:42 AM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
Hi im using displaytag-1.1.1.jar and displaytag.tld, then if i have to do as you said na, i have to get the source code of displaytag-1.1.1.jar and then i have to do what you have mentioned above.

Am i right rjual.

Please be patient if my questions are just silly.

Regards,
Prabhu.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-24-2008, 10:58 AM
rjuyal's Avatar
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
Quote:
if i have to do as you said na,
nahi yaar

create a file displaytag.properties keep it in your classes folder.

write this in the file:

Code:
basic.msg.empty_list=<div class="eCareFormData" align="left">&nbsp;Nothing found to display</div> paging.banner.full=<div class="pagelinks" style="display:none;" id="pagingBanner" align="right"><a href={1}><img src="shr/img/paging_ext_left_arrow.gif" border="0"></a> <a href={2}><img src="shr/img/paging_left_arrow.gif" border="0"></a> {5}of{6} <a href={3}><img src="shr/img/paging_right_arrow.gif" border="0"></a> <a href={4}><img src="shr/img/paging_ext_right_arrow.gif" border="0"></a></div> paging.banner.first=<div id="pagingBanner" style="display:none;" class="pagelinks" align="right"><a href={1}><img src="shr/img/paging_ext_left_arrow.gif" border="0"></a> <a href={2}><img src="shr/img/paging_left_arrow.gif" border="0"></a> {5}of{6} <a href={3}><img src="shr/img/paging_right_arrow.gif" border="0"></a> <a href={4}><img src="shr/img/paging_ext_right_arrow.gif" border="0"></a></div> paging.banner.last=<div style="display:none;" id="pagingBanner" class="pagelinks" align="right"><a href={1}><img src="shr/img/paging_ext_left_arrow.gif" border="0"></a> <a href={2}><img src="shr/img/paging_left_arrow.gif" border="0"></a> {5}of{6} <a href={3}><img src="shr/img/paging_right_arrow.gif" border="0"></a> <a href={4}><img src="shr/img/paging_ext_right_arrow.gif" border="0"></a></div> export.banner=<div class="pagelinks" style="display:none;" id="pagingBanner" align="right">{0}</div>
__________________
i am the future
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-24-2008, 11:01 AM
rjuyal's Avatar
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
also add these too

paging.banner.all_items_found=
paging.banner.some_items_found=
paging.banner.one_item_found=
paging.banner.onepage=
__________________
i am the future
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 06-24-2008, 12:46 PM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
Hi Rjual,
Do you have a displaytag.jar, in which you have customized the displaytag.properties file and re-made jar, so that it would be helpful to me. Or if you have sample project in which u have used ur logic to use display tag, any of the above... im little bit confused....

Looking forward for your reply.

Regards,
Prabhu.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 06-24-2008, 02:09 PM
rjuyal's Avatar
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
Quote:
customized the displaytag.properties file and re-made jar,
don't even try to do this, if you are thinking to do something like this.


simply keep your displaytag jar in lib .
and create the displaytag.properties in your own src directory.
[ display tag documentation says so ]


displaytag will search for displaytag.properties in your src directory, if found it will use this one, otherwise it will use its own property file.

Quote:
if you have sample project in which u have used

Sorry to say, i don't have sample project,
__________________
i am the future
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 06-24-2008, 02:10 PM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
Hi rijual,
From where should i call your code, that javascript function; now i have created displaytag.properties file with the code added given by you and from where should i call that javascript function.

Regards,
Prabhu.
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 06-24-2008, 02:11 PM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
Oh thank you very much Rjual, Let me try it and let you know.

Regards,
Prabhu.
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 06-24-2008, 02:26 PM
Member
 
Join Date: May 2008
Posts: 64
prabhurangan is on a distinguished road
Thank you so much Rijual, I was just going on some where, your post just saved me my days..........

Thank you... I have got the solutions.....
Meet you on further post.

Regards,
Prabhu.
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 06-24-2008, 02:30 PM
rjuyal's Avatar
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
rjuyal is on a distinguished road
If the proplem is solved then close the thread as solved.

if you think i helped you then click on [ located below ] as well.
__________________
i am the future
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display image ? Birkoff AWT / Swing 7 06-09-2008 09:58 AM
To display as a list yuvi461 New To Java 2 01-09-2008 02:06 PM
Display program nhlfan New To Java 2 11-22-2007 02:00 AM
Display XML in JTable boy22 XML 1 07-24-2007 02:02 AM


All times are GMT +3. The time now is 05:35 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org