primefaces-extensions / primefaces-extensions.github.com

Organization repo, only for homepage, wiki and issue tracker
https://primefaces-extensions.github.io/
70 stars 22 forks source link

PF 5.1.11 causes error to timeline component #308

Closed giorgioprimefaces closed 9 years ago

giorgioprimefaces commented 9 years ago

after upgrading PF 5.1-->PF 5.1.11 timeline component (PFE 3.0) stopped to work, in JS console I get thi error: Cannot read property 'getVisibleChartRange' of undefined

tandraschko commented 9 years ago

our releases are NOT aligned with elite releases, so we will just fix it for the upcoming version which will be compatible with 5.2.

ova2 commented 9 years ago

PFE 3.0 is built on top of PF 5.1.0 https://github.com/primefaces-extensions/primefaces-extensions.github.com/wiki/Release-Notes We don't provide Elite Releases because it is an open source project. You have to wait for the next PFE release which will be built on top of PF 5.2.

By the way, have you checked other JS errors in the console / your log file? I believe "Cannot read property 'getVisibleChartRange' of undefined" is the subsequent fault. getVisibleChartRange is an valid JS method in Timeline.

giorgioprimefaces commented 9 years ago

ok, thanks, do you know when 3.1.0 is planned to be released? thanks again Giorgio

tandraschko commented 9 years ago

~4 weeks after 5.2 would be my goal

ova2 commented 9 years ago

sounds good.

ova2 commented 9 years ago

Verified in all browsers. Working well for me with PF 5.2-SNAPSHOT. So, please wait until our 3.1.0 release which is built on top of PF 5.2.

giorgioprimefaces commented 9 years ago

still not working in these conditions: PF: 5.2.1 (and 5.2) PFE: 3.1.0 multiple timelines in a dialog (it works if I put everything into the page), it seems there's some problem with dialog here is some code:

$(function() {
onrangechange1(); // to set the range equal initially on page load
});

            function onrangechange1() {  
            var range = PF('wtimeLineCert1').getVisibleRange();  
            PF('wtimeLineCert2b2').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCoord3').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCertset2b4').setVisibleRange(range.start, range.end);  
            }  

            function onrangechange2() {  
            var range = PF('wtimeLineCert2b2').getVisibleRange();  
            PF('wtimeLineCert1').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCoord3').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCertset2b4').setVisibleRange(range.start, range.end);  
            } 
            function onrangechange3() {  
            var range = PF('wtimeLineCoord3').getVisibleRange();  
            PF('wtimeLineCert1').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCert2b2').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCertset2b4').setVisibleRange(range.start, range.end);  
            } 

            function onrangechange4() {  
            var range = PF('wtimeLineCertset2b4').getVisibleRange();  
            PF('wtimeLineCert1').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCert2b2').setVisibleRange(range.start, range.end);  
            PF('wtimeLineCoord3').setVisibleRange(range.start, range.end);  
            } 
ova2 commented 9 years ago

Sorry, but if you get "Cannot read property 'getVisibleChartRange' of undefined" then your timeline's widget is undefined. In short words: the timeline script is either not executet yet or you have typo in widget's name.

I don't know where you invoke $(function() {onrangechange1();}). In the dialog? Is dialog lazy loaded? I'm pretty sure, this is not a timelime problem. Try to access any other widget with PF(...) to see if you will get a similar error.

giorgioprimefaces commented 9 years ago

thanks Oleg, it was my fault I put $(function() {onrangechange1();}) in the wrong place and as you said it was called before creation of timelines

yours sincerely,

Il 23/04/2015 22:58, Oleg Varaksin ha scritto:

Sorry, but if you get "Cannot read property 'getVisibleChartRange' of undefined" then your timeline's widget is undefined. In short words: the timeline script is either not loaded yet or you have typo in widget's name.

I don't know where you invoke $(function() {onrangechange1();}). In the dialog? Is dialog lazy loaded? This is not a timelime problem. Try to access any other widget with PF(...) to see if you will get a similar error.

— Reply to this email directly or view it on GitHub https://github.com/primefaces-extensions/primefaces-extensions.github.com/issues/308#issuecomment-95716966.

ova2 commented 9 years ago

Glad to hear it works :-)