Where is pe:paginator?

Community Driven Extensions Project
djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

08 Oct 2014, 00:17

I am using v 2.0.

Where is pe:paginator?
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

08 Oct 2014, 07:43

It was removed long time back itself.

http://forum.primefaces.org/viewtopic.php?f=14&t=25394
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

08 Oct 2014, 23:06

Hmm bad news, I will check if i can get the source.

Defining paginator within datatable itself is not a elegant solution and creates very much boiler-plate markup. Especially if you have a generic DAO.

PF should provide <p:paginator> itself.

You know what was the latest version it was available?
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

13 Oct 2014, 08:58

I think it was available in PFExt 0.6.x version.By the way why it will create boiler-plate markup for generic DAO etc.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

djmj
Posts: 400
Joined: 16 Dec 2011, 01:23

14 Oct 2014, 01:19

Thanks will search it and build my own from it source if possible.

sudheer wrote:By the way why it will create boiler-plate markup for generic DAO etc.
Because i have like 20+ datatables with identical markup using a generic DAO class that inherits from LazyDataModel:

Code: Select all

<p:dataTable var="entity" value="#{bean.dao}" 
	rows="10" rowKey="#{entity.id}" selection="#{entity.selEntity}" selectionMode="single"
	paginator="true" paginatorPosition="bottom" pageLinks="1" paginatorAlwaysVisible="false"
	paginatorTemplate="#{msg.tablePaginatorTemplate}" emptyMessage="#{msg.noRecordsFound_u}">

    <!-- content -->
</p:dataTable>
Which could easily be reduced to:

Code: Select all

<p:dataTable var="entity" value="#{bean.dao}" 
	rows="10" rowKey="#{entity.id}" selection="#{bean.dao.selEntity}" selectionMode="single">
    <!-- content -->
    <comp:paginator dao="#{bean.dao}"/>
</p:dataTable>
Last edited by djmj on 05 Oct 2015, 00:51, edited 2 times in total.
Primefaces: 11.0.0 RC2
Primefaces-Extension: 11.0.0
PrimeFaces-Mobile: 11.0
OmniFaces: 3.11
Jsf: Mojarra 2.3.8
Server: Glassfish 5.1.0

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

14 Oct 2014, 06:04

This is bit a rare use case.But you can confirm with Oleg/Thomas whether any chances to port it back.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

14 Oct 2014, 10:53

sudheer wrote:This is bit a rare use case
It is not, I have an identical 'issue'. Did not try to use a custom component for the datatable yet since that would 'reduce' markup to

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

14 Oct 2014, 11:08

Exactly, it's really not that rare.
I have this problem with multiple components - like a pe:inputNumber specially configured for EURO.
I would always need to add ~5 attributes on the tag - thats annoying.

Currently i just derive the component class and overwrite the getter/statehelper#get call with my default value.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

14 Oct 2014, 17:38

@Thomas: is there a reason you did not create a (reusable) composite component but went for overriding a java class?

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

14 Oct 2014, 17:48

IMO its easier as replicate every component attr in the cc:interface section.
But i just done it for our company internal framework and only for such a global component - otherwise i use composites too.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests