TimelineEvent null in TimelineSelectEvent

Community Driven Extensions Project
Post Reply
benjes
Posts: 33
Joined: 12 Jun 2013, 18:25

03 Jun 2014, 14:05

Hi

I've got a p:timeline

Code: Select all

<h:form id="timelineForm">
<p:dialog header="#{bean.title}" widgetVar="timelineModal" width="800">
		<div style="width:780;">
		<pe:timeline id="eventSequenceTimeline"
								value="#{bean.timeLine}" height="250px"
								zoomable="true" showMajorLabels="true"
								width="100%"
								widgetVar="eventTimelineWidget">
								<p:ajax event="select" 
								process="@form"
									listener="#{bean.onSelect}"
									 />
							</pe:timeline>
			</s:div>
</p:dialog>
 </h:form>
and on the bean

Code: Select all

 public void onSelect(TimelineSelectEvent e) {  
	        TimelineEvent timelineEvent = e.getTimelineEvent();
	        log.info("TimelineSelectEvent #0 timeline event #1 source #2", e,timelineEvent,e.getSource());
	 }  
I am using PF extention 2.0 and PF 4.0.

a) when I don't use process="@form" the event listener is not called (@this does not work either)
b) when I use process="@form" the event listener is called but the TimelineEvent on the TimelineSelectEvent is null!

I've compared what is being submitted on the timeline demo:

Code: Select all

javax.faces.partial.ajax:true
javax.faces.source:timeline
javax.faces.partial.execute:timeline
javax.faces.behavior.event:select
javax.faces.partial.event:select
timeline_eventIdx:1
mainForm:mainForm
selectable_input:on
zoomable_input:on
moveable_input:on
stackEvents_input:on
eventStyle:box
currentTime_input:on
sourceTabView_activeIndex:0
javax.faces.ViewState:-44949295983565729:-5133493712255009419
to what is being send on my system:

Code: Select all

javax.faces.partial.ajax:true
javax.faces.source:timelineForm:eventSequenceTimeline
javax.faces.partial.execute:contLifecycleModalForm
javax.faces.behavior.event:select
javax.faces.partial.event:select
timelineForm:timelineForm
javax.faces.ViewState:-6873647107789893800:-7883880389977133050
It seems the timeline_eventIdx:XXX is not send which would explain why the timeline event is null. But why is it not send?
I can't see any javascript errors.

Any ideas what could be wrong?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

03 Jun 2014, 20:42

First of all: PF extention 2.0 is not compatible with PF 4.0. It's built on top of PF 5.0. Please try with PF extensions 1.6.2.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

gernan
Posts: 28
Joined: 06 Oct 2012, 05:15

23 Jul 2014, 23:07

Oleg wrote:First of all: PF extention 2.0 is not compatible with PF 4.0. It's built on top of PF 5.0. Please try with PF extensions 1.6.2.
Where can I download PF extensions 1.6.2? I have been searching... but I haven't found it.
Primefaces 6.0 | Primefaces Extensions 6.1.0 | Glassfish 4.1.0 | Mojarra 2.2.8
Hibernate 4.3.10 Final | NetBeans 8.1 | JDK 1.8.0_45

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

30 Jul 2014, 21:16

You can load it as usually from the Maven central repo http://search.maven.org/#search|ga|1|pr ... extensions
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

vidya.ambadipudi
Posts: 4
Joined: 12 Jun 2013, 15:58

14 Aug 2014, 11:29

Hi,

I am having the same problem with timeline.

But I am using Primefaces 5.0 and Primefaces Extension 2.0.0.

event = e.getTimelineEvent() is returning null in onEdit(TimelineModificationEvent e), onDelete(TimelineModificationEvent e) and onChange(TimelineModificationEvent e)

I have also created a ticket
http://forum.primefaces.org/viewtopic.php?f=14&t=39323

Could you please help me ?

Thanks

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests