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
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
{ String value = (String) parameters.get(id); inputElement.setAttribute("value", value); }// 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))
......
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