ICEfaces
  1. ICEfaces
  2. ICE-8045

component-showcase - Autocomplete server-side error in IE if using keyboard navigation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0.RC1
    • Fix Version/s: 3.1, EE-3.0.0.GA_P01
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Icefaces3/trunk revision# 28883
      Server: tomcat6
      Browser: IE7/8 (may be in other IE browsers)
    • Assignee Priority:
      P1

      Description

      In the component-showcase sample app - Autocomplete page:
      The tests pass, however there is a java.lang.NumberFormatException that occurs in the tomcat log when selecting a value from the autocomplete list if using the keyboard (not occurring in the other browsers, or when selecting the value with the mouse).

      java.lang.NumberFormatException: For input string: "undefined"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.
      java:48)
              at java.lang.Integer.parseInt(Integer.java:447)
              at java.lang.Integer.parseInt(Integer.java:497)
              at com.icesoft.faces.component.ext.KeyEvent.getKeyCode(KeyEvent.java:95)

              at com.icesoft.faces.component.selectinputtext.SelectInputText.queueEven
      tIfEnterKeyPressed(SelectInputText.java:584)
              at com.icesoft.faces.component.selectinputtext.SelectInputText.decode(Se
      lectInputText.java:123)
              at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.
      java:1181)
              at javax.faces.component.UIInput.processDecodes(UIInput.java:662)
              at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.
      java:1176)
          ..............

        Activity

        Hide
        yip.ng added a comment - - edited

        This is caused by the keycode becoming undefined when it should have the value for the Enter key: 13. See screenshot-01.png.

        Show
        yip.ng added a comment - - edited This is caused by the keycode becoming undefined when it should have the value for the Enter key: 13. See screenshot-01.png.
        Hide
        yip.ng added a comment -

        This is caused by the framework serialization and submit. See screenshot-02.png.

        Show
        yip.ng added a comment - This is caused by the framework serialization and submit. See screenshot-02.png.
        Hide
        Mircea Toma added a comment -

        The issue is caused by the false detection of the event type. Before submit the captured events are wrapped so that they provide a uniform API, regardless of the browser type. The detection of IE events was relying on the missing of the Event.preventDefault() method but Prototype is creating this method, trying to provide a common API based on the Netscape event API.

        The fix modifies the IE event detection by using Event.srcElement property instead of Event.preventDefault() method.

        Show
        Mircea Toma added a comment - The issue is caused by the false detection of the event type. Before submit the captured events are wrapped so that they provide a uniform API, regardless of the browser type. The detection of IE events was relying on the missing of the Event.preventDefault() method but Prototype is creating this method, trying to provide a common API based on the Netscape event API. The fix modifies the IE event detection by using Event.srcElement property instead of Event.preventDefault() method.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: