UI Components for JSF mrdodaPosts: 3Joined: 05 Apr 2016, 14:49 What is wrong? Calendar component cant change date when it is set to something. Why? How to do it properly? Simplest demo possible: Controller: Code: Select all
View: Code: Select all
When I click on it in the browser. It shows Cannot read property 'getDate' of null in Javascript console... And the popup DateTime Picker will not show up. What am I missing? version of primefaces: 5.3, Java 8, Server Wildfly 8.1.final Thank you all Miguel CubellsPosts: 99Joined: 25 Feb 2015, 11:02 06 Apr 2016, 16:06 If your managed bean is really defined like this: Code: Select all
then your calendar value should be defined like this: Code: Select all
Nothing to do with PrimeFaces, but basic JSF usage, I presume ... PrimeFaces 6.1 / PF Extensions 6.1.1 / Atmosphere 2.4.3 mrdodaPosts: 3Joined: 05 Apr 2016, 14:49 10 Apr 2016, 11:56
Well this is not the problem. I have this in my faces-config.xml -> Code: Select all
So it does connect to the right controller. It even shows the time on the website. but what doesnt work is when I click at the compponent, the poppup should show up, but the javascript error come instead. rossdPosts: 18Joined: 26 Oct 2015, 06:51 11 Apr 2016, 05:18 I would suspect that the default scope of the managed bean is too short lived for the ajax update to work, so you should try making it ViewScoped for the length of the time you are looking at the page. Ross. tandraschkoPrimeFaces Core DeveloperPosts: 3927Joined: 03 Dec 2010, 14:11Location: Bavaria, DE Contact: 11 Apr 2016, 07:57 I'm also not sure if the name from @ManagedBean or the name defined in faces-config has a higher prio
ExamplesGet the day of the month: const d = new Date(); Try it Yourself » Get the day of a specific date: const d = new Date("July 21, 1983 01:15:00"); Try it Yourself » Definition and UsageThe SyntaxParametersReturn Value
Browser Support
ES1 (JavaScript 1997) is fully supported in all browsers:
|