HI i just upgraded from 3.0.M3 to 3.0.M4 , and i noticed the p:schedule stopped working ...
i had it in one of my tabs of "<p:tabView dynamic="true" cache="false"..."
and when i click on this tab the page stuck and the ajax animation is being displayed...
any ideas?
Thanks , Daniel.
can any one confirm that p:schedule works on 3.0.M4
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
I'm experiencing the same behavior, but I don't have it in a tabView.
I have been unsuccessful at getting p:schedule to work for me ever since I began with PrimeFaces versions 3.0.M3, M4-SNAPSHOT, M4, and now RC1-SNAPSHOT. I've informed the community in several posts already and still hoping to get a solution, because I really would like to use p:schedule.
You can always google 'jquery fullCalendar' as p:schedule is wrapping the jquery fullCalendar implementation; fullCalendar has a very useful documentation at URL below. I would rather rely on p:schedule/Primefaces than having to do any additional jquery fullCalendar (javascript) coding.
http://arshaw.com/fullcalendar/docs/usage/
I have been unsuccessful at getting p:schedule to work for me ever since I began with PrimeFaces versions 3.0.M3, M4-SNAPSHOT, M4, and now RC1-SNAPSHOT. I've informed the community in several posts already and still hoping to get a solution, because I really would like to use p:schedule.
You can always google 'jquery fullCalendar' as p:schedule is wrapping the jquery fullCalendar implementation; fullCalendar has a very useful documentation at URL below. I would rather rely on p:schedule/Primefaces than having to do any additional jquery fullCalendar (javascript) coding.
http://arshaw.com/fullcalendar/docs/usage/
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
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
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
You'll experience same things if you use full calendar directly inside a tabview as you are updating it directly instead of using update api. See user's guide of schedule.
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
Optimus, I read p:schedule in latest (PF version 3) user guide; honestly, i haven't been able to get to the point of using p:schedule update, since i'm experiencing the same behavior that Daniel mentioned in his initial post above. My JSF web app contains menubar (and beans), which uses ajax to update the src of ui:include (index.xhtml) to display all pages in my app. I'm wondering if the use of AJAX is preventing me to use p:schedule. Also, please see my configuration (this allows p:dataTable row selection and general AJAX requests to work as designed) and code below.optimus.prime wrote:You'll experience same things if you use full calendar directly inside a tabview as you are updating it directly instead of using update api. See user's guide of schedule.
Also, I experienced the same behavior when I removed AJAX menubar and put p:schedule on standalone page, which had no use of AJAX (from what I remember); since then, I reverted my code to AJAX, with the hopes that I'll come across a solution, eventually.
faces-config.xml
Code: Select all
<lifecycle>
<phase-listener>pf.PostRedirectGetListener</phase-listener>
</lifecycle>
Code: Select all
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/mcms/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>com.sun.faces.allowTextChildren</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FULL_STATE_SAVING_VIEW_IDS</param-name>
<param-value>/index.xhtml</param-value>
</context-param>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
Code: Select all
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<ui:composition>
<h:form>
<p:panel header="ORDERS #{pf_ordersController.browseOption}">
<p:schedule editable="true" draggable="false"
value="#{ordersSchedule.lazyEventModel}"/>
</p:panel>
</h:form>
</ui:composition>
</html>
Code: Select all
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package jsf.orders;
import java.text.*;
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import jpa.entities.Orders;
import jpa.session.OrdersFacade;
import org.primefaces.model.DefaultScheduleEvent;
import org.primefaces.model.DefaultScheduleModel;
import org.primefaces.model.LazyScheduleModel;
import org.primefaces.model.ScheduleModel;
import pf.MessagesController;
/**
*
* @author Administrator
*/
@ManagedBean(name = "ordersSchedule")
public class OrdersSchedule {
private ScheduleModel lazyEventModel;
@EJB
private OrdersFacade ejbFacade;
private MessagesController messages;
public OrdersSchedule() {
lazyEventModel = new LazyScheduleModel() {
@Override
public void loadEvents(Date start, Date end) {
System.out.println("OrdersSchedule: lazyEventModel.loadEvents(" + start + "," + end + ")");
try {
// filter by
String tripDateFrom = getDateFromDateTime(start);
String tripDateTo = getDateFromDateTime(end);
List<Orders> filteredList = ejbFacade.findAllForMonth(tripDateFrom, tripDateTo);
Integer listSize = filteredList.size();
for (int i = 0; i <= listSize; i++) {
Orders order = filteredList.get(i);
String title = order.getCustomerId().getCustomerName();
Date tripDate = order.getTripDateTime();
Date returnDate = order.getReturnDateTime();
System.out.println("OrdersSchedule: lazyEventModel.addEvent(" + title + "," + tripDate + "," + returnDate + ")");
addEvent(new DefaultScheduleEvent(title, tripDate, returnDate));
}
} catch (ParseException parseException) {
parseException.printStackTrace();
messages.addFormErrorMsg("Error parsing Trip Date", (parseException.getMessage() != null) ? parseException.getMessage() : "");
} catch (Exception e) {
e.printStackTrace();
messages.addFormErrorMsg("Error retrieving list of Orders", (e.getMessage() != null) ? e.getMessage() : "");
}
} // loadEvents
};
System.out.println("OrdersSchedule: lazyEventModel.getEventCount() = " + lazyEventModel.getEventCount());
messages = new MessagesController();
}
private String getDateFromDateTime (Date date) throws ParseException {
DateFormat formatter;
String myDate;
formatter = new SimpleDateFormat("yyyy-MM-dd");
myDate = formatter.format(date);
return myDate;
} // getYearFromDate
public ScheduleModel getLazyEventModel() {
System.out.println("OrdersSchedule: getLazyEventModel()");
return lazyEventModel;
}
public void setLazyEventModel(ScheduleModel lazyEventModel) {
System.out.println("OrdersSchedule: setLazyEventModel()");
this.lazyEventModel = lazyEventModel;
}
}
Code: Select all
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><h:outputText value="MCMS"/></title>
<h:outputStylesheet name="#{pageNavigationController.css}"/>
</h:head>
<h:body>
<ui:include src="/header_menubar.xhtml"/>
<p:outputPanel id="pageContentPanel" style="width: 100%; height: 100%">
<p:ajaxStatus>
<f:facet name="start">
<!--
<p:outputPanel layout="block" style="z-index:9999; position: absolute; top: 15px; left: 94%;">
<p:graphicImage value="/resources/images/loading3.gif" />
</p:outputPanel>
-->
<p:outputPanel layout="block" style="z-index:9999; position: absolute; top: 15px; left: 50%; background: #FFF1A8; color: black;">
<h:outputText value="Working..." />
</p:outputPanel>
</f:facet>
<f:facet name="error">
<p:outputPanel layout="block" style="text-align: center !important;">
<h:outputText value="Error on partial page refresh." />
</p:outputPanel>
</f:facet>
<f:facet name="complete">
</f:facet>
</p:ajaxStatus>
<p:messages showDetail="true" showSummary="true" />
<p:outputPanel layout="block">
<ui:include src="#{pageNavigationController.page}"/>
</p:outputPanel>
</p:outputPanel>
</h:body>
</html>
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
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
I read the guide and updated the code...
here how it looks like (like in the showcase)
But it still does not work...
was i supposed to change anything on the server side ???
Thanks...
here how it looks like (like in the showcase)
Code: Select all
<p:schedule value="#{scheduleControllerBean.eventModel}" editable="true" widgetVar="myschedule" style="width:50%;height:50%">
<p:ajax event="dateSelect" listener="#{scheduleControllerBean.onDateSelect}" update="eventDetails" oncomplete="eventDialog.show()" />
<p:ajax event="eventSelect" listener="#{scheduleControllerBean.onEventSelect}" update="eventDetails" oncomplete="eventDialog.show()" />
<p:ajax event="eventMove" listener="#{scheduleControllerBean.onEventMove}" update="messages" />
<p:ajax event="eventResize" listener="#{scheduleControllerBean.onEventResize}" update="messages" />
</p:schedule>
But it still does not work...
was i supposed to change anything on the server side ???
Thanks...
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit
Tomcat 6
Win7 32bit
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
Daniel,
Sharing, because I don't know if this is a build issue for you.
Howard
- 1. if you revert back to 3.0.M3, does p:schedule work after you Full Build/re-build your project (a.k.a. Clean and Build in NetBeans)?
- 2. I'm assuming that you recently dropped 3.0.M3 from your project's list of Libraries/JARs, and only including 3.0.M4 JAR, correct?
- 3. What happens, if you remove the <p:ajax ... /> lines from <p:schedule ... /> ?
Sharing, because I don't know if this is a build issue for you.
Howard
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
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
Downgrading to 3.0.M3 didn't do anything... its still does not work...
even with the simplest example
only when i downgraded back to 3.0.M1 , stuff went back to normal...
So I decide to go back to 3.0.M1 , cause i having weird behavior with p:autoComplete too (it displayed location is waaaay weird... it jumped on top of other component in the screen :/ ) and p:selectOneMenu does not work in IE8 ...
bummer...
even with the simplest example
Code: Select all
<p:schedule value="#{scheduleControllerBean.eventModel}" editable="true" widgetVar="myschedule" style="width:50%;height:50%">
</p:schedule>
So I decide to go back to 3.0.M1 , cause i having weird behavior with p:autoComplete too (it displayed location is waaaay weird... it jumped on top of other component in the screen :/ ) and p:selectOneMenu does not work in IE8 ...
bummer...
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit
Tomcat 6
Win7 32bit
- kwintesencja
- Posts: 316
- Joined: 08 Feb 2010, 20:33
- Location: Brazil
have you changed the taglib namespace as mentionated in the migration guide?
i can use schedule without problems.
i can use schedule without problems.
Att,
--
Rafael Mauricio Pestano
Primefaces 5.x + JavaEE7(Glassfish 4.x and Wildfly 8)
Conventions Framework
Blog
@realpestano
--
Rafael Mauricio Pestano
Primefaces 5.x + JavaEE7(Glassfish 4.x and Wildfly 8)
Conventions Framework
Blog
@realpestano
yes i did changed
http://primefaces.prime.com.tr/ui -> http://primefaces.org/ui
OK , found the reason....
its cause of the
if i remove the dynamic property all works....
@optimus , what do you mean by saying use "using update api"
my schedule example is very simple
?
http://primefaces.prime.com.tr/ui -> http://primefaces.org/ui
OK , found the reason....
its cause of the
Code: Select all
<p:tabView dynamic="true" cache="false"
@optimus , what do you mean by saying use "using update api"
my schedule example is very simple
Code: Select all
<p:schedule value="#{scheduleControllerBean.eventModel}"
editable="true" widgetVar="myschedule"
style="width:50%;height:50%">
</p:schedule>
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit
Tomcat 6
Win7 32bit
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
Daniel, wow, i'm glad you resolved your p:schedule issue. Since you found the solution, can you go back to 3.0M4 or maybe even 3.0RC1-SNAPSHOT?
kwintesencja & Daniel, are you using AJAX on the same page that contains p:schedule, or is p:schedule on a page that is included via ui:include ?
kwintesencja & Daniel, are you using AJAX on the same page that contains p:schedule, or is p:schedule on a page that is included via ui:include ?
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
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
-
- Information
-
Who is online
Users browsing this forum: No registered users and 33 guests