ICEfaces
  1. ICEfaces
  2. ICE-5523

ice:selectOneListbox fails to select value if coming from a field with partialSubmit

    Details

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

      Description

      Using tab or mouse to enter an ice:selectOneListbox fails to select the value if coming from a field with partialSubmit set to true.

      <ice:inputText partialSubmit="true" immediate="true" size="6" value="#{registrationBean.CVV}"
      id="RegistrationBillingCreditCardCVV" validator="#{registrationBean.validateCVV}" required="true"
      requiredMessage="Invalid CVV" />

      <ice:selectOneListbox id="RegistrationBillingExpirationDateMonth"
      value="#{registrationBean.expMonth}" size="1" immediate="true" required="true"
      requiredMessage="#{msg['error.cardExpMonth']}">
      <f:selectItem itemLabel="Select..." itemValue="" />
      <f:selectItems value="#{generic:getSelectMonths()}" />
      </ice:selectOneListbox>

      With the above code I would expect when entering the list from the input text to have the "Select..." item selected. But this doesn't happen. It selects it only for a brief moment.

        Activity

        Hide
        Dumitru Ban added a comment -

        The problem is caused by the MenuRenderer that doesn't select the item if its value is null or "" and the submitted and selected values are also null. The same way it checks if the component is a HtmlSelectOneMenu and selects the item in these conditions it should also check if it is a HtmlSelectOneListbox and do the same.

        Show
        Dumitru Ban added a comment - The problem is caused by the MenuRenderer that doesn't select the item if its value is null or "" and the submitted and selected values are also null. The same way it checks if the component is a HtmlSelectOneMenu and selects the item in these conditions it should also check if it is a HtmlSelectOneListbox and do the same.
        Hide
        Dumitru Ban added a comment -

        The patch works with Tomcat version 6.0.16 or newer ones only if "-Dorg.apache.el.parser.COERCE_TO_ZERO=false" is used.

        Show
        Dumitru Ban added a comment - The patch works with Tomcat version 6.0.16 or newer ones only if "-Dorg.apache.el.parser.COERCE_TO_ZERO=false" is used.
        Hide
        Mark Collette added a comment - - edited

        Applied the patch.

        ICEfaces 2 trunk
        Subversion 24056

        ICEfaces trunk
        Subversion 24057

        Show
        Mark Collette added a comment - - edited Applied the patch. ICEfaces 2 trunk Subversion 24056 ICEfaces trunk Subversion 24057
        Hide
        Mandeep Hayher added a comment -

        Tested successfully on icefaces1.8 trunk revision# 24720 using FF3.6, IE8 & chrome10.

        Show
        Mandeep Hayher added a comment - Tested successfully on icefaces1.8 trunk revision# 24720 using FF3.6, IE8 & chrome10.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: