You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mahendan (JIRA)" <de...@myfaces.apache.org> on 2008/07/29 20:55:31 UTC

[jira] Created: (TOMAHAWK-1309) t:panelTab onclick attribute doesn't seem to work

t:panelTab onclick attribute doesn't seem to work
-------------------------------------------------

                 Key: TOMAHAWK-1309
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1309
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Tabbed Pane
    Affects Versions: 1.1.6
         Environment: Windows XP,  Websphere 6.1, Facelets 1.1.14, MyFaces Core 1.2.3
            Reporter: Mahendan



I am trying to call a custom javascript function when the user clicks on tab2.

This is what i got:

<script type="text/javascript">
<!--
 function hello() {
   alert("Hello");
 }
-->
</script>

<t:panelTabbedPane serverSideTabSwitch="false">
 <t:panelTab id="tab1" label="Tab1">
   Tab 1 data
 </t:panelTab>

 <t:panelTab id="tab2" label="Tab2" onclick="hello()">
  Tab 2
 </t:panelTab>
</t:panelTabbedPane>

When I look at the generated HTML I don't see the call to hello(). Can
someone please help me and let me know what I am doing wrong?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1309) t:panelTab onclick attribute doesn't seem to work

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618570#action_12618570 ] 

Leonardo Uribe commented on TOMAHAWK-1309:
------------------------------------------

provisional solution: just put a ; after hello, so the javascript appended do not mix:

 <t:panelTab id="tab2" label="Tab2" onclick="hello();">
  Tab 2
 </t:panelTab>

but anyway, the renderer should do this, not the developer when do jsf pages.

> t:panelTab onclick attribute doesn't seem to work
> -------------------------------------------------
>
>                 Key: TOMAHAWK-1309
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1309
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Tabbed Pane
>    Affects Versions: 1.1.6
>         Environment: Windows XP,  Websphere 6.1, Facelets 1.1.14, MyFaces Core 1.2.3
>            Reporter: Mahendan
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I am trying to call a custom javascript function when the user clicks on tab2.
> This is what i got:
> <script type="text/javascript">
> <!--
>  function hello() {
>    alert("Hello");
>  }
> -->
> </script>
> <t:panelTabbedPane serverSideTabSwitch="false">
>  <t:panelTab id="tab1" label="Tab1">
>    Tab 1 data
>  </t:panelTab>
>  <t:panelTab id="tab2" label="Tab2" onclick="hello()">
>   Tab 2
>  </t:panelTab>
> </t:panelTabbedPane>
> When I look at the generated HTML I don't see the call to hello(). 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.