ICEfaces
  1. ICEfaces
  2. ICE-3945

resetting input text value issue

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2 SP1
    • Fix Version/s: 1.8RC1, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ANY

      Description

      Problem Description: The issue is that the backing bean value of the input text component is not refreshed from the Reset button which has immediate=true set. We need to reset the form to pull the default values from the backing bean. Note, immediate=true needs to be set because we do not want any validation fired on the form when clicking reset.
       
      Test Passes: Type one or more characters in the input text field, and press Reset. The input text field is reset to the value from the backing bean.
       
      Test Fails: Clear out the input text field (delete all characters) and press Reset. The input text field does *not* pull the value from the backing bean and renders as blank.
       
      This test was executed with 1.7.1 SP1 and 1.8.0 DR#2

        Issue Links

          Activity

          Sam Xiao created issue -
          Sam Xiao made changes -
          Field Original Value New Value
          Salesforce Case [50070000007aPtl]
          Sam Xiao made changes -
          Description When click the button, the application populates the value of input text from the backing bean.
          The problem is that it only works when something entered inside the input box. i.e non-empty value
          When click the button, the application populates the value of input text from the backing bean.
          The problem is that it only works when something entered inside the input box. i.e non-empty value
          Standard JSF (i.e. non-ICEfaces) does't have this problem.
          Hide
          Scott Ratliff added a comment -

          Also we noticed that this occurs with Checkboxes - selectBooleanCheckbox.

          Show
          Scott Ratliff added a comment - Also we noticed that this occurs with Checkboxes - selectBooleanCheckbox.
          Ken Fyten made changes -
          Fix Version/s 1.8DR#3 [ 10143 ]
          Assignee Priority P2
          Assignee Adnan Durrani [ adnan.durrani ]
          Hide
          Mark Collette added a comment -

          This might be related to ICE-3190, where BridgeFacesContext.applyBrowserDOMChanges() modifies the previous DOM to reflect the submitted values, so that bean changes to the rendered output, reverting them to a previous value, can still result in a correct DOM diff.

          Show
          Mark Collette added a comment - This might be related to ICE-3190 , where BridgeFacesContext.applyBrowserDOMChanges() modifies the previous DOM to reflect the submitted values, so that bean changes to the rendered output, reverting them to a previous value, can still result in a correct DOM diff.
          Adnan Durrani made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Adnan Durrani added a comment -

          Sam can you please add a testcase which demonstrate the problem. I have created a demo, but its doing normal behaviour.

          The commandButtton type="reset" doesn't invoke any kind of submit, just wondering how they are getting values from the backing bean.

          Show
          Adnan Durrani added a comment - Sam can you please add a testcase which demonstrate the problem. I have created a demo, but its doing normal behaviour. The commandButtton type="reset" doesn't invoke any kind of submit, just wondering how they are getting values from the backing bean.
          Hide
          Sam Xiao added a comment -

          Test case shows the problem in Tomcat 6.0

          Show
          Sam Xiao added a comment - Test case shows the problem in Tomcat 6.0
          Sam Xiao made changes -
          Attachment support7884.war [ 11440 ]
          Ken Fyten made changes -
          Summary Issue populating input text value from backing bean resetting input text value issue
          Description When click the button, the application populates the value of input text from the backing bean.
          The problem is that it only works when something entered inside the input box. i.e non-empty value
          Standard JSF (i.e. non-ICEfaces) does't have this problem.
          Problem Description: The issue is that the backing bean value of the input text component is not refreshed from the Reset button which has immediate=true set. We need to reset the form to pull the default values from the backing bean. Note, immediate=true needs to be set because we do not want any validation fired on the form when clicking reset.
           
          Test Passes: Type one or more characters in the input text field, and press Reset. The input text field is reset to the value from the backing bean.
           
          Test Fails: Clear out the input text field (delete all characters) and press Reset. The input text field does *not* pull the value from the backing bean and renders as blank.
           
          This test was executed with 1.7.1 SP1 and 1.8.0 DR#2
          Paul Hanneman made changes -
          Link This issue depends on ICE-3190 [ ICE-3190 ]
          Mark Collette made changes -
          Assignee Adnan Durrani [ adnan.durrani ] Mark Collette [ mark.collette ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18255 Thu Jan 29 14:57:52 MST 2009 mark.collette ICE-3945 : resetting input text value issue
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18257 Thu Jan 29 15:55:37 MST 2009 mark.collette ICE-3945 : resetting input text value issue
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
          Hide
          Mark Collette added a comment -

          BridgeFacesContext.applyBrowserDOMChanges() was only covering the case where the old DOM value was empty, the submitted value was non-empty, and the new DOM value is empty. There's the reverse scenario, where the new and old DOM values are non-empty, but the same, and the submitted value was empty. This is now covered, as well as for the equivalent checkbox case too.

          Subversion 18255
          icefaces\core\src\com\icesoft\faces\context\BridgeFacesContext.java

          Show
          Mark Collette added a comment - BridgeFacesContext.applyBrowserDOMChanges() was only covering the case where the old DOM value was empty, the submitted value was non-empty, and the new DOM value is empty. There's the reverse scenario, where the new and old DOM values are non-empty, but the same, and the submitted value was empty. This is now covered, as well as for the equivalent checkbox case too. Subversion 18255 icefaces\core\src\com\icesoft\faces\context\BridgeFacesContext.java
          Mark Collette made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Mark Collette added a comment -

          Removed debug.

          Subversion 18257
          icefaces\core\src\com\icesoft\faces\context\BridgeFacesContext.java

          Show
          Mark Collette added a comment - Removed debug. Subversion 18257 icefaces\core\src\com\icesoft\faces\context\BridgeFacesContext.java
          Ken Fyten made changes -
          Fix Version/s 1.8 [ 10161 ]
          Assignee Priority P2
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mark Collette [ mark.collette ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Sam Xiao
            • Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: