ICEfaces
  1. ICEfaces
  2. ICE-1532

If running ICEfaces under WebLogic the dom update always the "form" element level

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#3
    • Fix Version/s: 1.6DR#4, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      WebLogic + ICEFaces

      Description

      If an application is running under WebLogic server, then the ICEFaces always sends "form" element level dom update regardless of what element changed.

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment -

          To synchronize the server side DOM with the client side DOM, ICEFaces uses a method , which checks if the component id found in the requestMap then update the server side node's value with the value found in the requestMap.

          It came across that when running ICEfaces under WebLogic, the requestMap contains a pair of key and value with a "" blank string.

          So due to the blank string the following methods clears out the "value" of "hidden" fields. see the pseudo code below:

          .......
          // As ICEfaces doesn't give any ids to its hidden fields used by the form
          // so the following call would return a blank string for hidden fields only
          String id = inputElement.getAttribute("id");

          // As if the id is a blank string, the following condition should be false but
          // with WebLogic + ICEfaces map contains a key and value with a blank string.
          // which makes the following expression to be true and
          // sets hidden fields value with a blank string.
          if (parameters.containsKey(id))

          { String value = (String) parameters.get(id); inputElement.setAttribute("value", value); }
          ......

          So in order to fix this bug we can either remove a blank key from the request Map or we can add a check for a blank string, so we choose to add a check for a blank string. so the above code has been modified similar to that:

          if (!"".equals(id) && parameters.containsKey(id)) { String value = (String) parameters.get(id); inputElement.setAttribute("value", value); }

          Why it returns the "form" element for DOM update?
          When domDiff algorithm looks for changes, hidden field says I have changed and returns its parent node for dom update which was a form element.

          Changes have been checked in to the following branches: revision 13771
          svn\ossrepo\icefaces\trunk\icefaces\core
          svn\ossrepo\icefaces\branches\icefaces-1.5\icefaces\core

          Show
          Adnan Durrani added a comment - To synchronize the server side DOM with the client side DOM, ICEFaces uses a method , which checks if the component id found in the requestMap then update the server side node's value with the value found in the requestMap. It came across that when running ICEfaces under WebLogic, the requestMap contains a pair of key and value with a "" blank string. So due to the blank string the following methods clears out the "value" of "hidden" fields. see the pseudo code below: ....... // As ICEfaces doesn't give any ids to its hidden fields used by the form // so the following call would return a blank string for hidden fields only String id = inputElement.getAttribute("id"); // As if the id is a blank string, the following condition should be false but // with WebLogic + ICEfaces map contains a key and value with a blank string. // which makes the following expression to be true and // sets hidden fields value with a blank string. if (parameters.containsKey(id)) { String value = (String) parameters.get(id); inputElement.setAttribute("value", value); } ...... So in order to fix this bug we can either remove a blank key from the request Map or we can add a check for a blank string, so we choose to add a check for a blank string. so the above code has been modified similar to that: if (!"".equals(id) && parameters.containsKey(id)) { String value = (String) parameters.get(id); inputElement.setAttribute("value", value); } Why it returns the "form" element for DOM update? When domDiff algorithm looks for changes, hidden field says I have changed and returns its parent node for dom update which was a form element. Changes have been checked in to the following branches: revision 13771 svn\ossrepo\icefaces\trunk\icefaces\core svn\ossrepo\icefaces\branches\icefaces-1.5\icefaces\core

            People

            • Assignee:
              Unassigned
              Reporter:
              Adnan Durrani
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: