{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/23","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/23/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/23/events","html_url":"https://github.com/primefaces/primefaces/issues/23","id":68706780,"number":23,"title":"f:ajax not supported by PrimeFaces components","user":{"login":"mattweaver-cv","id":11963331,"avatar_url":"https://avatars.githubusercontent.com/u/11963331?v=3","gravatar_id":"","url":"https://api.github.com/users/mattweaver-cv","html_url":"https://github.com/mattweaver-cv","followers_url":"https://api.github.com/users/mattweaver-cv/followers","following_url":"https://api.github.com/users/mattweaver-cv/following{/other_user}","gists_url":"https://api.github.com/users/mattweaver-cv/gists{/gist_id}","starred_url":"https://api.github.com/users/mattweaver-cv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattweaver-cv/subscriptions","organizations_url":"https://api.github.com/users/mattweaver-cv/orgs","repos_url":"https://api.github.com/users/mattweaver-cv/repos","events_url":"https://api.github.com/users/mattweaver-cv/events{/privacy}","received_events_url":"https://api.github.com/users/mattweaver-cv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/primefaces/primefaces/labels/defect","name":"defect","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-15T15:08:19Z","updated_at":"2015-04-19T05:01:10Z","closed_at":null,"body":"In PrimeFaces 5+, if I use an f:ajax tag as an event handler under a datable (or other components), I get a JavaScript error in Firefox, \"event is undefined\".  It works in other browsers.\r\n\r\nI traced it through to CoreRenderer.java, in PF 4 it was wrapping ClientBehavior scripts in a block like this:\r\n\r\n```java\r\nwriter.write(\"function(event,ext){PrimeFaces.bc(this,event,ext,[\");\r\n```\r\n\r\nIn PF 5 it was changed to this:\r\n\r\n```java\r\nwriter.write(\"function(ext) {\");\r\n```\r\n\r\nMyFaces seems to generate JS for f:ajax that looks like this:\r\n\r\n```javascript\r\njsf.ajax.request('id',event,...)\r\n```\r\n\r\nSince the wrapper function no longer has an event argument, it causes a JS error in Firefox (Chrome, IE, Opera and Safari have a global event object, so it works there).\r\n\r\nI have a small project I made to demonstrate by modifying the Showcase example, I will try to attach."},"comment":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/comments/94236937","html_url":"https://github.com/primefaces/primefaces/issues/23#issuecomment-94236937","issue_url":"https://api.github.com/repos/primefaces/primefaces/issues/23","id":94236937,"user":{"login":"frederikd","id":1390133,"avatar_url":"https://avatars.githubusercontent.com/u/1390133?v=3","gravatar_id":"","url":"https://api.github.com/users/frederikd","html_url":"https://github.com/frederikd","followers_url":"https://api.github.com/users/frederikd/followers","following_url":"https://api.github.com/users/frederikd/following{/other_user}","gists_url":"https://api.github.com/users/frederikd/gists{/gist_id}","starred_url":"https://api.github.com/users/frederikd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederikd/subscriptions","organizations_url":"https://api.github.com/users/frederikd/orgs","repos_url":"https://api.github.com/users/frederikd/repos","events_url":"https://api.github.com/users/frederikd/events{/privacy}","received_events_url":"https://api.github.com/users/frederikd/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T05:01:10Z","updated_at":"2015-04-19T05:01:10Z","body":"This is quite a severe issue for us. We cannot use p:ajax just for primefaces components (and f:ajax for the rest) because of the separate ajax queue handling to Mojarra's queue handling so we would get concurrent ajax requests.\r\nAnd we can't change all our components to use p:ajax either because the behaviour of p:ajax is so different to f:ajax and the delayed parameter execution of p:ajax is causing massive issues for queued ajax requests for us (sending \"wrong\" values).\r\nSo a fix for this would really be great as otherwise we can't use Primefaces components or need to override the Javascript ourselves resulting in maintenance nightmares."}}