You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by tejapraveen <ja...@gmail.com> on 2008/04/23 12:36:35 UTC

Add pipes to a datascroller pagination

Hi everybody

Iam new to Jsf and Myfaces.Is there possibility to get the Pipe or Divider
in DataScroller?

Iam using datascroller in that scroller i want to use pipe(|)symbol.In jsf
or myfaces how to implement that.If any body know the solution for this
please send reply as soon as possible

example: Like such type of pipe symbol(|) i want to use in between those
number

< 1 | 2 | 3 | 4| 5 | >

So please kindly response my request

Venkat 




-- 
View this message in context: http://www.nabble.com/Add-pipes-to-a-datascroller-pagination-tp16833974p16833974.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Add pipes to a datascroller pagination

Posted by "simon.kitching@chello.at" <si...@chello.at>.
tejapraveen schrieb:
> Hi everybody
>
> Iam new to Jsf and Myfaces.Is there possibility to get the Pipe or Divider
> in DataScroller?
>
> Iam using datascroller in that scroller i want to use pipe(|)symbol.In jsf
> or myfaces how to implement that.If any body know the solution for this
> please send reply as soon as possible
>
> example: Like such type of pipe symbol(|) i want to use in between those
> number
>
> < 1 | 2 | 3 | 4| 5 | >
>   
Do you mean the Tomahawk t:dataScroller component?

If so, then that does *not* currently support adding chars between the
page numbers. It always just outputs
  <td>1</td><td>2</td>
etc.

It does have the ability to set CSS styles on various bits. So you might
like to try experimenting with the css :before property. Or try using
CSS to set the "border" property on the TD cells that contain the
page-numbers, which would look similar.

Otherwise you would need to customise the HtmlDataScrollerRenderer class
from tomahawk. See methods
  writePaginatorElementStart
  writePaginatorElementEnd

JSF has a reasonably elegant method for installing custom renderer
classes, so you can subclass the tomahawk renderer and just override the
above methods.

Or you could provide a patch to the standard Tomahawk renderer class to
allow a new "paginatorElementBetween" facet to get rendered between each
page number; I think that would have a reasonable chance of being
accepted for the trunk code - although the next tomahawk release is not
going to be for at least a month I think.

Regards,
Simon


Re: Add pipes to a datascroller pagination

Posted by Mike Kienenberger <mk...@gmail.com>.
I don't know for sure if this is enough to help you, but dataScroller
can take an optional output element.  Perhaps you can output your own
formatted values using that technique:

For example, you can use this instead of (or in addition to) the
standard paginated list:

                <h:outputFormat value="{0} records found, displaying
{1} records, from {2} to {3}. Page {4} / {5}" styleClass="standard" >
                    <f:param value="#{rowsCount}" />
                    <f:param value="#{displayedRowsCountVar}" />
                    <f:param value="#{firstRowIndex}" />
                    <f:param value="#{lastRowIndex}" />
                    <f:param value="#{pageIndex}" />
                    <f:param value="#{pageCount}" />
                </h:outputFormat>


On 4/28/08, tejapraveen <ja...@gmail.com> wrote:
>
>
>
>  tejapraveen wrote:
>  >
>  > Hi everybody
>  >
>  > Iam new to Jsf and Myfaces.Is there possibility to get the Pipe or Divider
>  > in DataScroller?
>  >
>  > Iam using datascroller in that scroller i want to use pipe(|)symbol.In jsf
>  > or myfaces how to implement that.If any body know the solution for this
>  > please send reply as soon as possible
>  >
>  > example: Like such type of pipe symbol(|) i want to use in between those
>  > number
>  >
>  > < 1 | 2 | 3 | 4| 5 | >
>  >
>  > So please kindly response my request
>  >
>  > Venkat
>  >
>  >
>  >
>  >
>  >
>
>
> Thanks for your reply.
>
>
>  But iam unable to write custom datascroller.Iam new to jsf so please can you
>  provide any samples regarding implementing custom datascroller
>
>
>
>  Venkat
>
>
>  --
>  View this message in context: http://www.nabble.com/Add-pipes-to-a-datascroller-pagination-tp16833974p16936675.html
>
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: Add pipes to a datascroller pagination

Posted by tejapraveen <ja...@gmail.com>.


tejapraveen wrote:
> 
> Hi everybody
> 
> Iam new to Jsf and Myfaces.Is there possibility to get the Pipe or Divider
> in DataScroller?
> 
> Iam using datascroller in that scroller i want to use pipe(|)symbol.In jsf
> or myfaces how to implement that.If any body know the solution for this
> please send reply as soon as possible
> 
> example: Like such type of pipe symbol(|) i want to use in between those
> number
> 
> < 1 | 2 | 3 | 4| 5 | >
> 
> So please kindly response my request
> 
> Venkat 
> 
> 
> 
> 
> 

Thanks for your reply.


But iam unable to write custom datascroller.Iam new to jsf so please can you
provide any samples regarding implementing custom datascroller



Venkat

-- 
View this message in context: http://www.nabble.com/Add-pipes-to-a-datascroller-pagination-tp16833974p16936675.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.