schedule with pagination

UI Components for JSF
Post Reply
banto.78
Posts: 38
Joined: 26 Dec 2013, 18:45

09 Nov 2014, 19:11

Dear experts,

i have a schedule, something like the following:

Code: Select all

<p:schedule id="schedule"
							value="#{calendarControllerBean.eventModel}"
							locale="#{res.locale}" widgetVar="myschedule"
							styleClass="customCalendar" view="agendaWeek"
							style="background-color:white;color:black;" minTime="#{res.minTime}"
							maxTime="#{res.maxTime}" slotMinutes="#{res.slotMinutes}"
							timeFormat="#{res.timeFormat}{ - #{res.timeFormat}}"
							axisFormat="#{res.axisFormat}" draggable="false" 
							timeZone="#{userBean.userTimeZone}" resizable="false">

							<p:ajax event="dateSelect"
								listener="#{calendarControllerBean.onDateSelect}"
								update="eventDetails" oncomplete="eventDialog.show()"
								onerror="sessionExpiredDialog.show()" />
							<p:ajax event="eventSelect"
								listener="#{calendarControllerBean.onEventSelect}"
								update="eventDetails" oncomplete="eventDialog.show()"
								onerror="sessionExpiredDialog.show()" />

						</p:schedule>
                                    ...............................
If i have a lot of schedule entries (kind of 700 or more) the systems becomes very very slow to load.

I was wondering of the following:
1. how can i load entries per month (kind of pagination)?
2. do you have such case and what is the best practice?

thanks a lot! :?
Tomcat/7.0.35, primefaces-4.0.jar
atmosphere-runtime-2.1.0-RC2.jar,
jsf-api-2.2.0-m05.jar, jsf-impl-2.2.0-m05.jar
Eclipse 3.8 ¦ FF

anatoly314
Posts: 34
Joined: 12 Feb 2014, 17:03

10 Nov 2014, 08:39

value="#{calendarControllerBean.eventModel}"
You need provide to this method begin date and end date, and return events which placed inside this interval. I believe that PF manual can help you how to get these dates. JQuery calendar plugin on which PF Scheduler based provides it, so Scheduler will have it too I believe.
I use Primefaces 5.1 with Apache MyFaces 2.0.2 and Websphere 8.0.0.9

banto.78
Posts: 38
Joined: 26 Dec 2013, 18:45

10 Nov 2014, 14:59

thanks for your reply. Indeed that is my idea too but i would like to know how to get the end and start date anytime the user change month...
Tomcat/7.0.35, primefaces-4.0.jar
atmosphere-runtime-2.1.0-RC2.jar,
jsf-api-2.2.0-m05.jar, jsf-impl-2.2.0-m05.jar
Eclipse 3.8 ¦ FF

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

10 Nov 2014, 16:59

Read the following from start to finish, and you will see some code that others have shared for their solution/workaround.

Issue 930: viewChangeListener on Schedule Component (maybe 2 years ago, I used code that was shared in this issue)

schedule - day, week, month, today events
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

banto.78
Posts: 38
Joined: 26 Dec 2013, 18:45

15 Nov 2014, 19:26

thanks smithh032772 for your answers. I think that would solve indeed. However at moment I opted to keep entries in a cache in memory and looks good. And it does not occupy lot of space either.

thanks!
Tomcat/7.0.35, primefaces-4.0.jar
atmosphere-runtime-2.1.0-RC2.jar,
jsf-api-2.2.0-m05.jar, jsf-impl-2.2.0-m05.jar
Eclipse 3.8 ¦ FF

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests