I seen a few post about htis issue but no resolution.

When I use a t:commandButton with a t:panelTabbedPane, I get a weird
behavior. The action for the button is invoked when I don't have a check box
in a column that I use for row editing checked. If I check the button then
the button action is never called but the page is posted back to the server
and refreshed.

Any ideas? I've tried putting the form inside the t:panelTab and the
t:commandButton in different locations but I get the same behavior.

I also noticed that with I.E. I get an " 'ellements' is null or not an
object" javascript error when I enter the page. The error doesn't show up in
firefox.


<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>



<%
String path = request.getContextPath();
String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
        <base href="<%=basePath%>">

        <title>My JSF 'TableGames.jsp' starting page</title>

        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">    
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
</head>
  
<body>
        <f:view>
        <h:form>
        <t:panelTabbedPane bgcolor="#FFFFCC" serverSideTabSwitch="false">
                <t:panelTab id="tab1" label="Tab 1">
                <f:verbatim>Tab 1 Pane</f:verbatim>
                </t:panelTab>
                <t:panelTab id="tab2" label="Tab 2">
                <t:inputText/>
                </t:panelTab>
                <t:panelTab id="tab3" label="Tab 3">
                
                        <t:dataTable value="#{tableGamesBean.rowDataModel}" 
var="r"
                                styleClass="scrollerTableNoWidth"
                headerClass="standardTable_Header"
                footerClass="standardTable_Header"
                rowClasses="standardTable_Row1,standardTable_Row2"
               
columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
                                
rowOnMouseOver="this.style.backgroundColor='#A5CBFF'"
                rowOnMouseOut="this.style.backgroundColor='#FFFFE0'"
                rowOnClick="this.style.backgroundColor='#FFE0E0'"
                rowOnDblClick="this.style.backgroundColor='#E0E0E0'">
                                <t:column>
                                        <f:facet name="header">
                                                <t:outputText  value="Edit"/>
                                </f:facet>
                                        <h:selectBooleanCheckbox 
value="#{tableGamesBean.rowEdit}"
onclick="submit()" />
                                </t:column>
                            <t:columns 
value="#{tableGamesBean.columnDataModel}" var="oneColumn">
                                <f:facet name="header">            
                                        <t:outputText 
value="#{tableGamesBean.columnLabel}" />        
                                </f:facet>
                                        <t:outputText id="test" 
value="#{tableGamesBean.columnValue}"
onclick="alert(this.id);" rendered="#{not tableGamesBean.rowEdit}"/>
                                        <t:inputText  
value="#{tableGamesBean.columnValue}"
rendered="#{tableGamesBean.rowEdit}"/>
                        </t:columns>
                        </t:dataTable>
                        
                </t:panelTab>
        </t:panelTabbedPane>
                <t:commandButton value="Save Changes"
action="#{tableGamesBean.saveChanges}"/>
                </h:form>
        </f:view>
</body>
</html>


-- 
View this message in context: 
http://www.nabble.com/t%3ApanelTabbedPane-t%3AcommandButton-action-problems-tf2308295.html#a6417390
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to