You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Plant More Tree <ma...@gmail.com> on 2008/07/27 12:56:42 UTC

Re: dataTable be like digg ?

Hi,

   Anyone please help here ... thanks !

regards,
Mark


Plant More Tree wrote:
> 
> Hi guys,
> 
>    My facelets code is below :
> 
> --------------------------------------------------------------------------------------
> <t:dataTable id="suls" var="sul" style="margin-top: 10px"
>     value="#{home.sharedUrlList}" rows="15">
>     
>     
>     <t:column width="8%" styleClass="leftCube">
>          	<div style="font-size:18px;color:#7E8B8B">#{sul.sent}</div>
>          	<div style="font-size:16px;color:#7E8B8B">#{text['sent']}</div>
>          	<div style="padding-top:15px"> # send </div>
>     </t:column>    
>     
>     <t:column width="48%" style="padding:0px 5px 25px 15px">
>         <div>
>         	<div class="leftRowContent">
>         		<div style="font-weight:bold"> http://www.pikepier.com
> #{sul.title} </div>
>         		<div style="font-size:13px">#{sul.description}</div>
>         		<div style="font-size:13px;padding-top:5px">
>         		    <div style="font-size:11px"> #{sul.url} #{sul.url} </div>
>         		    <div style="font-size:12px">
>         		        #{sul.ago}
>         		    	 # #{sul.username} 
>         		    </div>
>                           
>                 	</div>
>         	</div>
>         </div>
> 
>     </t:column>
>     
> </t:dataTable>
> 
> <ui:include src="/common/tableFooter.xhtml">
>     <ui:param name="tableName" value="suls"/> 
> </ui:include>
> --------------------------------------------------------------------------------------
> 
> common/tableFooter.xhtml
> --------------------------------------------------------------------------------------
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:c="http://java.sun.com/jstl/core"
>       xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
>       xmlns:ui="http://java.sun.com/jsf/facelets"
> xmlns:t="http://myfaces.apache.org/tomahawk">
> 
> 
>     <t:dataScroller id="scroll" for="#{tableName}"
>         pageCountVar="pageCount" pageIndexVar="pageIndex"
> immediate="false"
>         styleClass="scroller" paginator="true" paginatorMaxPages="10"
>         paginatorTableClass="paginator">
>         <f:facet name="previous">
>             <t:graphicImage url="/images/arrow-previous.gif"/>
>         </f:facet>
>         <f:facet name="next">
>             <t:graphicImage url="/images/arrow-next.gif"/>
>         </f:facet>
>     </t:dataScroller>
> 
> </html>
> --------------------------------------------------------------------------------------
> 
> The problem is that when there are less than 15 rows, the previous and
> next arrow in the dataScroller still appear. How to make it disappear when
> the return data is <= the predefined row (rows="15") ? In addition, if I
> have like 1000 records, the dataScroller will show like :
> 
> <- 1 2 3 4 5 6 7 8 9 ->
> 
> then when I clicked on '9', it will become
> 
> <- 9 10 11 12 13 14 15 16 17 18 19 ->
> 
> so it's possible to make it like digg, which is (when I got 1000 records)
> :
> 
> <- 1 2 3 4 5 6 7 8 9 .... 28 29 30 ->
> 
> There is 1 more problem here is that when I clicked on says '2', after the
> page refresh, the '2' should be like in bold and disable. How can I
> configure this ?
> 
> Appreciate someone out there can assist on this matters. 
> 
> Thanks & Regards,
> Mark
> (http://www.50waystohelp.com)
> 

-- 
View this message in context: http://www.nabble.com/dataTable-be-like-digg---tp17748503p18675279.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.