ajaxStatus + schedule doesn´t work!

UI Components for JSF
Post Reply
farukzahra
Posts: 20
Joined: 26 Aug 2011, 21:58

17 Apr 2012, 15:41

Hello,

I'm trying to use the ajaxStatus (to show the loading) + schedule and am not having success!

The ajaxStatus not let the schedule fire the events to ManagedBean, when I remove the ajaxStatus it works!

Any hints to solve?

I'm using:

primefaces-3.2.jar
javax.faces-2.1.4.jar (mojarra)
apache-tomcat-7.0.21
jdk 6

ps : Sorry for my english :oops:

farukzahra
Posts: 20
Joined: 26 Aug 2011, 21:58

17 Apr 2012, 15:43

my ajaxstatus :

base.xhtml

Code: Select all

....
              <p:ajaxStatus onstart="loading.show();" oncomplete="loading.hide();" />			
			<p:dialog modal="true" widgetVar="loading" draggable="false" closable="false" showHeader="false" resizable="false">
				<div style="text-align:center; width: 64px;"> 
					<p:graphicImage value="/images/ajax-loader.gif"/>
					Carregando
				</div>
      		</p:dialog>
....
my schedule page

Code: Select all

<p:schedule value="#{scheduleTarefaMB.schedule}" axisFormat="HH:mm"
					style="width:75%;heigth:95%;margin: 0 auto;" slotMinutes="15"
					widgetVar="myschedule" locale="pt" timeZone="GMT-3" firstHour="8"
					view="agendaDay" timeFormat="HH:mm">
					<p:ajax event="dateSelect" update="pnlTarefa"
						listener="#{scheduleTarefaMB.onDateSelect}"
						oncomplete="eventDialog.show()" />
					<p:ajax event="eventSelect" update="pnlTarefa"
						listener="#{scheduleTarefaMB.onEventSelect}"
						oncomplete="eventDialog.show()" />
					<p:ajax event="eventMove" update="messages"
						listener="#{scheduleTarefaMB.onEventMove}"
						oncomplete="myschedule.update();" />
					<p:ajax event="eventResize" update="messages"
						listener="#{scheduleTarefaMB.onEventResize}"
						oncomplete="myschedule.update();" />
				</p:schedule>

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

17 Apr 2012, 17:05

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

farukzahra
Posts: 20
Joined: 26 Aug 2011, 21:58

17 Apr 2012, 20:16

Sorry Howard W. Smith Jr. ,

I'm sorry, your link doesn´t help me ... :cry:

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

17 Apr 2012, 20:28

farukzahra wrote:Sorry Howard W. Smith Jr. ,

I'm sorry, your link doesn´t help me ... :cry:
1. Did you see the following? viewtopic.php?f=3&t=17590
farukzahra wrote:I'm trying to use the ajaxStatus (to show the loading) + schedule and am not having success!

The ajaxStatus not let the schedule fire the events to ManagedBean, when I remove the ajaxStatus it works!
2. Months ago, i removed ajaxStatus on my p:schedule pages.
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

farukzahra
Posts: 20
Joined: 26 Aug 2011, 21:58

17 Apr 2012, 22:15

Howard W. Smith Jr. I need to use the ajaxstatus with the schedule :roll: , and now?

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

17 Apr 2012, 22:20

If/when you get it working, please reply with your solution (code/xhtml changes etc).
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

farukzahra
Posts: 20
Joined: 26 Aug 2011, 21:58

17 Apr 2012, 22:28

Someone else has a solution for this bug? :ugeek:

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

17 Apr 2012, 22:47

1. PrimeFaces p:schedule component = jQuery fullCalendar (you can search 'google' for that)
2. The following is from PrimeFaces 3.2 user guide
Ajax Updates

Schedule has a quite complex UI which is generated on-the-fly by the client side PrimeFaces.widget.Schedule widget to save bandwidth and increase page load performance. As a result when you try to update schedule like with a regular PrimeFacess PPR, you may notice a UI lag as the DOM will be regenerated and replaced. Instead, Schedule provides a simple client side api and the update method. Whenever you call update, schedule will query it's server side ScheduleModel instance to check for updates, transport method used to load events dynamically is JSON, as a result this approach is much more effective then updating with regular PPR. An example of this is demonstrated at editable schedule example, save button is calling myschedule.update() at oncomplete event handler.
3. This leads me to believe that ajaxStatus and schedule cannot be used together.

4. If you feel this is a bug, then create new issue in issue tracker, and that way you will get response from PrimeFaces lead about it.
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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests