You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Ingo Hofmann (JIRA)" <de...@myfaces.apache.org> on 2010/01/25 17:30:34 UTC

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

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.


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

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ 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.


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

Posted by "Ingo Hofmann (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-2507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804593#action_12804593 ] 

Ingo Hofmann commented on MYFACES-2507:
---------------------------------------

Same behavior with JSP, btw.

<%@ page session="false" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<html>
<f:view>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
</head>
    <body>
    <h:form id="form">
        <h:panelGrid id="grid" columns="2">
            <h:commandLink value="Hello Wold" onclick="confirm('Hello World')" action="update">
            </h:commandLink>                       
        </h:panelGrid>
    </h:form>
    </body>
</f:view>
</html>


> 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.