You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Rolf Kulemann (JIRA)" <de...@myfaces.apache.org> on 2006/11/15 15:47:37 UTC

[jira] Created: (TOMAHAWK-784) user specified onclick contents not rendered in panel tabs

user specified onclick contents not rendered in panel tabs
----------------------------------------------------------

                 Key: TOMAHAWK-784
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-784
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Tabbed Pane
    Affects Versions: 1.1.3
            Reporter: Rolf Kulemann
            Priority: Minor


If onclick attribute is specified in panelTab tag, the contents of the attribute is not rendered.
Offending code is in HtmlTabbedPaneRenderer.writeHeaderCell

...
writer.writeAttribute("onclick", "return myFaces_showPanelTab(" + tabIndex + ",'" + getTabIndexSubmitFieldIDAndName(tabbedPane, facesContext) + "'," + '\'' + getHeaderCellID(tab, facesContext) + "','" + tab.getClientId(facesContext) + "'," + getHeaderCellsIDsVar(tabbedPane, facesContext) + ',' + getTabsIDsVar(tabbedPane, facesContext) + ',' + (activeUserClass != null ? '\'' + activeUserClass + '\'' : "null") + ',' + (inactiveUserClass != null ? '\'' + inactiveUserClass + '\'' : "null") + ',' + (activeSubStyleUserClass != null ? '\'' + activeSubStyleUserClass + '\'' : "null") + ',' + (inactiveSubStyleUserClass != null ? '\'' + inactiveSubStyleUserClass + '\'' : "null") + ");", null);
...



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-784) user specified onclick contents not rendered in panel tabs

Posted by "Adam Jenkins (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472022 ] 

Adam Jenkins commented on TOMAHAWK-784:
---------------------------------------

***********WORK AROUND*****************

Hi All,

Until this issue is fixed, you can use the following workaround to achieve the same results.  In your pages body onload event, put a reference to a function that does the following (it is expected that the tab you want to listen to the click on is <t:panelTab id="aPanelTab">...</t:panelTab>)

/*Tomahawk bug workaround (the onclick in tabbed panel in 1.1.3 doesn't work)*/            
function onPageLoad(){
            var myTab = document.getElementById("aPanelTab_headerCell");
            myTab.onclick = function() { myFunction(); };
}

unfortunately you have to do this for each and every tab, but hey, it'll get you working until a fix goes in.

> user specified onclick contents not rendered in panel tabs
> ----------------------------------------------------------
>
>                 Key: TOMAHAWK-784
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-784
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Tabbed Pane
>    Affects Versions: 1.1.3
>            Reporter: Rolf Kulemann
>            Priority: Minor
>
> If onclick attribute is specified in panelTab tag, the contents of the attribute is not rendered.
> Offending code is in HtmlTabbedPaneRenderer.writeHeaderCell
> ...
> writer.writeAttribute("onclick", "return myFaces_showPanelTab(" + tabIndex + ",'" + getTabIndexSubmitFieldIDAndName(tabbedPane, facesContext) + "'," + '\'' + getHeaderCellID(tab, facesContext) + "','" + tab.getClientId(facesContext) + "'," + getHeaderCellsIDsVar(tabbedPane, facesContext) + ',' + getTabsIDsVar(tabbedPane, facesContext) + ',' + (activeUserClass != null ? '\'' + activeUserClass + '\'' : "null") + ',' + (inactiveUserClass != null ? '\'' + inactiveUserClass + '\'' : "null") + ',' + (activeSubStyleUserClass != null ? '\'' + activeSubStyleUserClass + '\'' : "null") + ',' + (inactiveSubStyleUserClass != null ? '\'' + inactiveSubStyleUserClass + '\'' : "null") + ");", null);
> ...

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


[jira] Resolved: (TOMAHAWK-784) user specified onclick contents not rendered in panel tabs

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cagatay Civici resolved TOMAHAWK-784.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.6-SNAPSHOT

Onclick events will be processed before the tab contents are displayed.

> user specified onclick contents not rendered in panel tabs
> ----------------------------------------------------------
>
>                 Key: TOMAHAWK-784
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-784
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Tabbed Pane
>    Affects Versions: 1.1.3
>            Reporter: Rolf Kulemann
>         Assigned To: Cagatay Civici
>            Priority: Minor
>             Fix For: 1.1.6-SNAPSHOT
>
>
> If onclick attribute is specified in panelTab tag, the contents of the attribute is not rendered.
> Offending code is in HtmlTabbedPaneRenderer.writeHeaderCell
> ...
> writer.writeAttribute("onclick", "return myFaces_showPanelTab(" + tabIndex + ",'" + getTabIndexSubmitFieldIDAndName(tabbedPane, facesContext) + "'," + '\'' + getHeaderCellID(tab, facesContext) + "','" + tab.getClientId(facesContext) + "'," + getHeaderCellsIDsVar(tabbedPane, facesContext) + ',' + getTabsIDsVar(tabbedPane, facesContext) + ',' + (activeUserClass != null ? '\'' + activeUserClass + '\'' : "null") + ',' + (inactiveUserClass != null ? '\'' + inactiveUserClass + '\'' : "null") + ',' + (activeSubStyleUserClass != null ? '\'' + activeSubStyleUserClass + '\'' : "null") + ',' + (inactiveSubStyleUserClass != null ? '\'' + inactiveSubStyleUserClass + '\'' : "null") + ");", null);
> ...

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


[jira] Commented: (TOMAHAWK-784) user specified onclick contents not rendered in panel tabs

Posted by "Adam Jenkins (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472019 ] 

Adam Jenkins commented on TOMAHAWK-784:
---------------------------------------

I have hit this issue also...the javascript method in the onclick isn't being rendered to the final page.  This seems like a pretty quick fix -- can someone comment on if this is a real bug and any workarounds/fix eta?

> user specified onclick contents not rendered in panel tabs
> ----------------------------------------------------------
>
>                 Key: TOMAHAWK-784
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-784
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Tabbed Pane
>    Affects Versions: 1.1.3
>            Reporter: Rolf Kulemann
>            Priority: Minor
>
> If onclick attribute is specified in panelTab tag, the contents of the attribute is not rendered.
> Offending code is in HtmlTabbedPaneRenderer.writeHeaderCell
> ...
> writer.writeAttribute("onclick", "return myFaces_showPanelTab(" + tabIndex + ",'" + getTabIndexSubmitFieldIDAndName(tabbedPane, facesContext) + "'," + '\'' + getHeaderCellID(tab, facesContext) + "','" + tab.getClientId(facesContext) + "'," + getHeaderCellsIDsVar(tabbedPane, facesContext) + ',' + getTabsIDsVar(tabbedPane, facesContext) + ',' + (activeUserClass != null ? '\'' + activeUserClass + '\'' : "null") + ',' + (inactiveUserClass != null ? '\'' + inactiveUserClass + '\'' : "null") + ',' + (activeSubStyleUserClass != null ? '\'' + activeSubStyleUserClass + '\'' : "null") + ',' + (inactiveSubStyleUserClass != null ? '\'' + inactiveSubStyleUserClass + '\'' : "null") + ");", null);
> ...

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