Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-702

Calendar component error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0.1
    • wtk
    • None
    • java version: JDK 1.6.0_20 64bits
      App locale: pt_BR

    Description

      I'm getting a very strange behavior with Calendar component, that can be reproduced in "kitchen Sink" demo too.
      My application is configured with pt_BR locale, and when I try to select some days in May, calendar automatically changes to april, and when I select 1st May 2011 I get an IndexOutOfBoundsException (see exception bellow).
      In "kitchen Sink", when a Calendar configured with US or CA locale is used, everything's ok, but when another locale based in another country (no metter the language) is used, the error can be reproduced, ex:

      es_US, fr_CA - ok
      es_ES, fr_FR - error

      java.lang.IndexOutOfBoundsException: index -1 out of bounds.
      at org.apache.pivot.collections.ArrayList.verifyIndexBounds(ArrayList.java:577)
      at org.apache.pivot.collections.ArrayList.get(ArrayList.java:346)
      at org.apache.pivot.wtk.TablePane$Row.get(TablePane.java:263)
      at org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.updateSelection(TerraCalendarSkin.java:706)
      at org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.selectedDateChanged(TerraCalendarSkin.java:963)
      at org.apache.pivot.wtk.Calendar$CalendarSelectionListenerList.selectedDateChanged(Calendar.java:90)
      at org.apache.pivot.wtk.Calendar.setSelectedDate(Calendar.java:212)
      at org.apache.pivot.wtk.skin.terra.TerraCalendarSkin$4.selectionChanged(TerraCalendarSkin.java:506)
      at org.apache.pivot.wtk.ButtonGroup$ButtonGroupListenerList.selectionChanged(ButtonGroup.java:46)
      at org.apache.pivot.wtk.ButtonGroup.setSelection(ButtonGroup.java:128)
      at org.apache.pivot.wtk.Button.setState(Button.java:469)
      at org.apache.pivot.wtk.Button.setSelected(Button.java:432)
      at org.apache.pivot.wtk.skin.terra.TerraCalendarSkin$DateButton.press(TerraCalendarSkin.java:77)
      at org.apache.pivot.wtk.skin.terra.TerraCalendarSkin$DateButtonSkin.mouseClick(TerraCalendarSkin.java:219)
      at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseClick(Component.java:483)
      at org.apache.pivot.wtk.Component.mouseClick(Component.java:2777)
      at org.apache.pivot.wtk.Container.mouseUp(Container.java:774)
      at org.apache.pivot.wtk.Container.mouseUp(Container.java:759)
      at org.apache.pivot.wtk.Container.mouseUp(Container.java:759)
      at org.apache.pivot.wtk.Container.mouseUp(Container.java:759)
      at org.apache.pivot.wtk.Container.mouseUp(Container.java:759)
      at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:914)
      at java.awt.Component.processEvent(Unknown Source)
      at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processEvent(ApplicationContext.java:709)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)

      Attachments

        Activity

          People

            gbrown Gregory K. Brown
            luizgustavoss Luiz Gustavo Stábile de Souza
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: