ICEfaces
  1. ICEfaces
  2. ICE-6684

Cannot use DateTimeEntry component with java.sql.Date

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      n/a
    • Affects:
      Compatibility/Configuration

      Description

      When using the dateTimeEntry ace component in a dataTable fronting a database with a DATE column, a java.sql.Date value will be returned by the ResultSet. When this value is encoded by the dateTimeEntry component, it calls Date.getMinutes(), which has been deprecated since Java 1.1. When getMinutes() is called on the java.sql.Date super class, it throws an IllegalArgumentException as seen below:

      SEVERE: Error Rendering View[/secure/applicants.xhtml]
      java.lang.IllegalArgumentException
      at java.sql.Date.getMinutes(Date.java:189)
      at org.icefaces.component.datetimeentry.DateTimeEntryRenderer.encodeEnd(DateTimeEntryRenderer.java:115)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:308)
      at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:181)
      at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:125)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:300)
      at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:101)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:300)
      at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:101)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at com.icesoft.faces.component.util.CustomComponentUtils.renderChild(CustomComponentUtils.java:308)
      at com.icesoft.faces.component.panelpopup.PanelPopupRenderer.encodeBegin(PanelPopupRenderer.java:230)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1754)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:54)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:153)
      at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:378)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)


      We should not use these deprecated methods, and rely on proper Calendar instances instead.

        Activity

        Philip Breau created issue -
        Philip Breau made changes -
        Field Original Value New Value
        Assignee Ken Fyten [ ken.fyten ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.0.1 [ 10255 ]
        Affects [Compatibility/Configuration]
        Assignee Priority P2
        Assignee Ken Fyten [ ken.fyten ] Yip Ng [ yip.ng ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24210 Mon Mar 21 14:01:43 MDT 2011 yip.ng ICE-6684: Cannot use DateTimeEntry component with java.sql.Date.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/datetimeentry/DateTimeEntryRenderer.java
        Hide
        yip.ng added a comment -

        Revision: 24210


        Modified : /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/datetimeentry/DateTimeEntryRenderer.java

        Show
        yip.ng added a comment - Revision: 24210 Modified : /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/datetimeentry/DateTimeEntryRenderer.java
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2

          People

          • Assignee:
            yip.ng
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: