ICEfaces
  1. ICEfaces
  2. ICE-5158

Odd dates of selectInputDate component trigger validation of other fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.2-EE-GA, 1.8.3
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Selecting an odd date (not even) on a selectInputDate triggers validation of the other fields in the page when immediate is set to true. The same thing happens for the "Show previous month" and "Show previous year" buttons. When selecting an even date, "Show next month" or "Show next year" everything works as expected.

      main.xhtml

      <?xml version="1.0" encoding="UTF-8"?>
      <!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:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ice="http://www.icesoft.com/icefaces/component">
      <head>
      <title>Test</title>
      <ice:outputStyle href="xmlhttp/css/rime/rime.css" />
      </head>
      <body>
      <ice:form partialSubmit="false" id="Form">
      <ice:panelGrid columns="3">
      <ice:inputText value="#{bean.text}" id="Text" required="true">
      <f:validateLength minimum="2" />
      </ice:inputText>
      <ice:selectInputDate value="#{bean.date}" renderAsPopup="false" partialSubmit="false" id="Date" immediate="true" />
      <ice:selectOneListbox value="#{bean.item}" size="1" required="true" id="Combo">
      <f:selectItem itemLabel="Select..." itemValue="-1" />
      <f:selectItem itemLabel="0" itemValue="0" />
      <f:selectItem itemLabel="1" itemValue="1" />
      <f:selectItem itemLabel="2" itemValue="2" />
      <f:validateLongRange minimum="0" />
      </ice:selectOneListbox>
      </ice:panelGrid>
      <ice:commandButton actionListener="#{bean.submit}" value="Submit" />
      <br />
      <ice:outputText value="Text: #{bean.text}&lt;br/&gt;Date: #{bean.date}&lt;br/&gt;Item: #{bean.item}" escape="false" />
      </ice:form>

      <ice:messages />
      </body>
      </html>

      Bean.java

      package org.local.test;

      import java.util.Date;

      import javax.faces.event.ActionEvent;

      public class Bean {
      private String text;
      private Date date;
      private Integer item;

      public String getText() {
      return text;
      }

      public void setText(String text) {
      this.text = text;
      }

      public Date getDate() {
      return date;
      }

      public void setDate(Date date) {
      this.date = date;
      }

      public Integer getItem() {
      return item;
      }

      public void setItem(Integer item) {
      this.item = item;
      }

      public void submit(ActionEvent ae) {
      System.err.println("submit");
      }
      }

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20968 Mon Mar 15 17:46:27 MDT 2010 mark.collette ICE-5384 : ICE-5158 built with just-ice
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19794 Thu Nov 26 10:33:24 MST 2009 yip.ng ICE-5158: Fixed bug of date selection triggering validation of other fields, with patch submitted by Dumitru Ban.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Dumitru Ban
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: