Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-alpha
-
None
Description
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>