|
|
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.
|
|

06-24-2008, 09:38 AM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
|
[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.
|
|

06-24-2008, 09:58 AM
|
 |
Senior Member
|
|
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
|
|
in your jsp
<div class="pagelinks" align="right" id="insertHereTop"></div>
<div class="pagelinks" align="right" id="insertHereBottom"></div>
insertNavigation ( 'insertHereTop', 'insertHereBottom' );
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
|
|

06-24-2008, 10:30 AM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
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.
<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>
|
|

06-24-2008, 10:35 AM
|
 |
Senior Member
|
|
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
|
|
|
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
|
|

06-24-2008, 10:42 AM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
|
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.
|
|

06-24-2008, 10:58 AM
|
 |
Senior Member
|
|
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
|
|
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:
basic.msg.empty_list=<div class="eCareFormData" align="left"> 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
|
|

06-24-2008, 11:01 AM
|
 |
Senior Member
|
|
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
|
|
|
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
|
|

06-24-2008, 12:46 PM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
|
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.
|
|

06-24-2008, 02:09 PM
|
 |
Senior Member
|
|
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
|
|
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.
if you have sample project in which u have used
Sorry to say, i don't have sample project,
__________________
i am the future
|
|

06-24-2008, 02:10 PM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
|
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.
|
|

06-24-2008, 02:11 PM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
|
Oh thank you very much Rjual, Let me try it and let you know.
Regards,
Prabhu.
|
|

06-24-2008, 02:26 PM
|
|
Member
|
|
Join Date: May 2008
Posts: 64
|
|
|
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.
|
|

06-24-2008, 02:30 PM
|
 |
Senior Member
|
|
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
|
|
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
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|