onClick on commandLink does not trigger loading of required jsf.js ------------------------------------------------------------------
Key: MYFACES-2507 URL: https://issues.apache.org/jira/browse/MYFACES-2507 Project: MyFaces Core Issue Type: Bug Components: JSR-314 Affects Versions: 2.0.0-alpha Reporter: Ingo Hofmann The commandLink's "onClick" attribute will be rendered as onclick="jsf.util.chain(...)" what requires the variable "jsf" which is defined in jsf.js. However, the renderer does not load the appropriate file so that the onClick action will be ignored (or end up as a JavaScript error) if - for instance - no Ajax component is present on the same page. Find the example below to reproduce this issue (click on command link will not have any effects): <?xml version="1.0" encoding="ISO-8859-1" ?> <!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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" > <h:head> </h:head> <h:body> <h:form id="mainForm"> <h:panelGrid id="grid" columns="2"> <h:commandLink value="Click me!" onclick="confirm('Hello World')" action="update"> </h:commandLink> </h:panelGrid> </h:form> </h:body> </html> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.