ICEfaces
  1. ICEfaces
  2. ICE-1962

Using converters with ice:selectInputText

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1, 1.7DR#3
    • Fix Version/s: 1.7RC1, 1.7
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Any

      Description

      When using converters with selectInputText, one starts typing something in the text box. Then, after a pause (1 second, I guess) whatever one has typed so far is sent to the server to be evaluated so that a popup list of possible matching values appears in the view. The problem is that whatever we have typed so far must be of the correct data type already, otherwise a conversion error is displayed. This doesn't represent a problem for numerical values, but it is a problem for date values. One has to type the date really fast to avoid getting a conversion error.

      For example, when using the standard DateTime converter, if I just type 'Jan' and make a pause, I will get a conversion error, and whatever I typed will be deleted, and I won't get the popup list of possible matching values.

      Something similar happens with the Boolean converter. If I take too long to type 'true' it will change the text to 'false'.

      This is the code I'm using in the jspx document:

          ...
          <ice:selectInputText id="testSelInpTxt"
                         converter="#{selInpTxtConvBean.selectedConverter}"
                         value="#{selInpTxtConvBean.value}"
          >
              <f:selectItems value="#{selInpTxtConvBean.valueList}" />
          </ice:selectInputText>
          <ice:message for="testSelInpTxt"/>
          ...

      The files can be found in the qa repo (qa/trunk/test/application/web/converter/selectinputtex.jspx)

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          Unfortunately, having the converter validator fire when a partial entry is typed is an unavoidable side-effect of the implementation of this component.

          However, the described behavior of "I will get a conversion error, and whatever I typed will be deleted, and I won't get the popup list of possible matching values." seems problematic. The entered text should not be blanked out, and the matching list should still appear, even if a conversion error occurs.

          Show
          Ken Fyten added a comment - Unfortunately, having the converter validator fire when a partial entry is typed is an unavoidable side-effect of the implementation of this component. However, the described behavior of "I will get a conversion error, and whatever I typed will be deleted, and I won't get the popup list of possible matching values." seems problematic. The entered text should not be blanked out, and the matching list should still appear, even if a conversion error occurs.
          Hide
          yip.ng added a comment -

          Tried overriding minimum no. of methods to bypass conversion and validation, but there are complications. A component's valid flag is checked throughout the life cycle for various processing. Setting it to either true of false will cause some undesirable code execution. That means we have to override every method that uses the valid flag? (But some of them are private methods?)

          The auto complete list is updated in the value changed listener. That means we have to fire the event based on the submitted values, not the converted and validated values? But current listeners assume that the value is converted and validated.

          We are working with submitted values only, yet we have to go through the whole life cycle as if everything was OK (i.e. no renderResponse()). That means we have to also override methods that checked the set / unset / reset status of the submitted value / local value / bound value of the component for processing?

          Show
          yip.ng added a comment - Tried overriding minimum no. of methods to bypass conversion and validation, but there are complications. A component's valid flag is checked throughout the life cycle for various processing. Setting it to either true of false will cause some undesirable code execution. That means we have to override every method that uses the valid flag? (But some of them are private methods?) The auto complete list is updated in the value changed listener. That means we have to fire the event based on the submitted values, not the converted and validated values? But current listeners assume that the value is converted and validated. We are working with submitted values only, yet we have to go through the whole life cycle as if everything was OK (i.e. no renderResponse()). That means we have to also override methods that checked the set / unset / reset status of the submitted value / local value / bound value of the component for processing?
          Hide
          Mark Collette added a comment -

          Fixed in ICE-2743.

          Show
          Mark Collette added a comment - Fixed in ICE-2743 .

            People

            • Assignee:
              Unassigned
              Reporter:
              Arturo Zambrano
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: