myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Polverini <a...@nibbles.it>
Subject Bug in x:panelTabbedPane ?
Date Tue, 04 Jan 2005 18:38:16 GMT
Hello,
I'm experimenting a little with tab panels but I've some problems and
since I'm a n00b I can't understand if I'm doing something wrong or the
implementation of tab panels is buggy.
The only values saved between tab switches are the ones inside
inputTexts, the other components (in this example a checkbox and a
date).

This is the JSP code I'm using:

<%@page contentType="text/html"%>
<%@page 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/extensions" prefix="x"%>
<html>
  <body>

    <f:view>
      <x:panelTabbedPane bgcolor="#FFFFCC" >

        <x:panelTab id="tab1" label="Tab1" >
          <h:outputLabel for="bool1" value="Bool1"/>
          <h:selectBooleanCheckbox id="bool1" value="#{myMap.bool1}" />
          <h:outputText value="Date1"/>
          <x:inputDate id="date1" value="#{myMap.date1}"
popupCalendar="true"/>
          <h:message for="date1"/>
        </x:panelTab>

        <x:panelTab id="tab2" label="Tab2" >
          <h:outputText value="Date2"/>
          <x:inputDate id="date2" value="#{myMap.date2}"
popupCalendar="true"/>
          <h:message for="date2"/>
        </x:panelTab>

      </x:panelTabbedPane>
    </f:view>

  </body>
</html>

and this is the managed bean declaration:
  <managed-bean>
    <managed-bean-name>myMap</managed-bean-name>
    <managed-bean-class>java.utils.HashMap</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>

To test the wrong behaviour is simple: check the checkBox and select a
date, then switch to tab2, and then on tab1 again: everything is reset
to default.

Also, it can be noted the bug of the popup calendar: the popup opened is
wrong if the year field is empty, but I've opened a bug report for that
at http://issues.apache.org/jira/browse/MYFACES-73 .

Thanks for any help,
Alex



Mime
View raw message