You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/02/03 03:26:19 UTC

[jira] Resolved: (MYFACES-2507) onClick on commandLink does not trigger loading of required jsf.js

     [ https://issues.apache.org/jira/browse/MYFACES-2507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-2507.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-2
         Assignee: Leonardo Uribe

> 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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.0-beta-2
>
>
> 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.