Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    A Form's values do not show in Internet Explorer 8 and 9

    Version:
    v8.2p_2012-05-09/PowerEdition Deployment 2012-05-09. Also failing in SNAPSHOT_v8.3d_2012-08-29/PowerEdition Deployment 2012-08-29

    Browser:
    IE 8 and 9

    We're seeing a problem that appears only in Internet Explorer 8 and 9. We have a DynamicForm that shows fine in Firefox but shows only the field titles and no values in Internet Explorer 8 and 9.

    I've looked in the server log and have found no indication of problem. On the client side, I do see a problem, the DynamicForm instance shows that it contains only the the first field's value, though it does have the complete field list. To see that, I'm looking in the SmartClient Console and asking to evaluate the .values and .fields javascript. When in Firefox, the complete list of values does appear.

    Here are the results in IE9:
    Evaluator: result of 'isc_DynamicForm_10.fields...' (14ms):
    [Obj{name:IDES}, Obj{name:CountIDES}, Obj{name:DIVNAM}, Obj{name:CountICNCPT}, Obj{name:CNCPTNAM}, Obj{name:CountIDIV}, Obj{name:DPTNAM}, Obj{name:CountIDPT}, Obj{name:SBDNAM}, Obj{name:CountISBD}, Obj{name:CLSNAM}, Obj{name:CountICLS}, Obj{name:VENNAM}, Obj{name:IVST}, Obj{name:CountIVST}, Obj{name:CLRNAM}, Obj{name:CountICLR}, Obj{name:SIZNAM}, Obj{name:CountISIZ}, Obj{name:ISKU}, Obj{name:CountISKU}, Obj{name:CGPNAM}, Obj{name:CountICGP}, Obj{name:ISDS}, Obj{name:ISBN}, Obj{name:IGTIN}, Obj{name:isc_SpacerItem_0}, Obj{name:IATT01}, Obj{name:IATT02}, Obj{name:IATT03}, Obj{name:IATT04}
    ]
    Evaluator: result of 'isc_DynamicForm_10.values...' (16ms):
    {IDES: "TEST 328 DESC"}

    The form is attached to a ValuesManager and is added to a Canvas that's inside of a SectionStack. Initially, even the known field value comes up missing. However, I find that if I drag a side of the SectionStack to alter its size, that one field's value does appear. However, the remaining field values remain empty, showing only the field title.

    Any thoughts as to what's happening?

    Thanks,
    Larry

    #2
    There's not a lot we can tell you from just this information, except that if a drag resize corrects the problem, since the framework would never update form values from a resize, this strongly suggests an issue in application code.

    We'd recommend looking at the values you are passing to the form at each point that you can: as they arrive from the server (RPC tab in the Developer Console), through the steps of whatever processing you do with them, up to the point they are provided to the ValuesManager or form. Then check what the ValuesManager/form repeat as their values immediately after this (not some time later, after more of your logic may have run).

    Comment


      #3
      If it was a problem with the application code, can you think of a reason why it would work properly in FireFox but not in IE?

      I forgot to mention that it works fine in IE if I'm running it in development mode in Eclipse. It only fails when I run it in tomcat. This makes it impossible to get it to fail in debug mode.

      Comment


        #4
        There are hundreds of reasons, from timing-dependent code that runs faster in Firefox, to GWT bugs, to browser plugins.. a long list.

        Next step is to get more information, and we've suggested ways of doing so.

        Comment


          #5
          I've narrowed it down to a javascript error:
          'Object doesn't support property or method 'startsWith''in http://balboa:8087/ipgui/sc/modules/ISC_Forms.js?isc_version=7.0.js at line 1363

          I've located the code in ISC_Forms.js. Here's a snippet of that code:

          Code:
          1361 if(this.hasDataElement()){var _4=this.getDataElement();if(_4!=null){this.$17j(_2);return _4.value=_1}}
          1362 var _5=this.$15h();if(_5!=null){if(this.showValueIconOnly)_1=isc.emptyString;var _6=this.$xq(_2);if(_6!=null)
          1363 _1=_6+(_1!=null?_1:isc.emptyString);if(isc.Browser.isIE){if(_1&&_1.startsWith("<nobr>"))
          1364 _1=_1.substring(6);if(_1&&_1.endsWith("</nobr>"))
          1365 _1=_1.substring(0,_1.length-7);try{_5.innerHTML=_1}catch(e){var _7=document.createElement("span");_7.innerHTML=_1;_5.innerHTML="";_5.appendChild(_7)}}else{_5.innerHTML=_1}
          1366 if(!this.clipValue||this.height==null||this.width==null){this.adjustOverflow("textBox value changed")}}}
          1367 ,isc.A.$17j=function isc_FormItem__updateValueIcon(_1){if(this.suppressValueIcon||!this.isDrawn())return;var _2=this.$144(_1),_3=this.$15v();if(_2!=null){if(this.imageURLSuffix!=null)_2+=this.imageURLSuffix;_2=isc.Canvas.getImgURL(_2,this.imageURLPrefix||this.baseURL||this.imgDir);if(_3!=null){_3.src=_2}else{var _4=false;if(this.hasDataElement()){var _5=this.getDataElement();if(_5!=null){isc.Element.insertAdjacentHTML(_5,"beforeBegin",this.$xq(_1));_5.style.width=this.getTextBoxWidth(_1);_4=true}}else{var _6=this.$15h();if(_6!=null){isc.Element.insertAdjacentHTML(_6,"afterBegin",this.$xq(_1));_4=true}}
          1368 if(!_4)this.redraw()}}else if(_3!=null&&!(isc.isAn.Array(_1)&&_1.length>1)){isc.Element.clear(_3);if(this.hasDataElement()){var _5=this.getDataElement();_5.style.width=this.getTextBoxWidth(_1)}}}
          ,isc.A.setPrompt=function isc_FormItem_setPrompt(_1){this.prompt=_1}
          It failes in line 1363, this code:
          if(isc.Browser.isIE){if(_1&&_1.startsWith("<nobr>"))

          I see that there was an issue much like this submitted in April: http://forums.smartclient.com/showthread.php?t=21857

          In that issue, the solution was to find application code that ended up accessing this code via a setType() call. Once that line was commented out, it no longer hit this bad code. Do you have an understanding of where the link is between that call and this javascript code?

          I tried removing all calls to setType() just to see what would happen. It didn't help.

          Any further thoughts on how to pursue a solution?

          Thanks.

          Comment


            #6
            With that other thread, we looked at setType() and there was no plausible way it could have resulted in the error he hit. The most likely thing is that you are both hitting an obscure core GWT bug affecting IE only.

            You should be able to get a stack trace out of the Developer Console which might let us say more (see FAQ).

            Also, since superficially this bug seems to be a String that's not really a String, it might be related to the other String-related GWT bug noted in the FAQ, which has been reportedly fixed for GWT 2.5, which is currently at RC1. Trying out that GWT release might fix the problem, in which case at least you know it's fixed by the next GWT even if you're not comfortable using a release candidate for final deployment.

            Comment


              #7
              The string issue was the culprit. We were using a FormItemValueFormatter to reformat field values in the form.

              The goal of that formatter was to manipulate certain fields and it was using toStrings to accomplish it.

              Here's the code that was causing the problem. It's from our formatValue() override in the FormItemValueFormatter:

              Code:
              if (count!=null && count> 1) {
              	return value.toString() + "&nbsp;<font size=-2 ><I>(" 
              	+ count 
              	+ " included"
              	+ ")</I><font>";
              } else {
              	return value.toString();
              }
              To fix it, we did away with toString(). Here's the revised code:

              Code:
              if (count!=null && count> 1) {
              	return value + "&nbsp;<font size=-2 ><I>(" 
              	+ count 
              	+ " included"
              	+ ")</I><font>";
              } else {
              	return "" + value;
              }
              Thanks for your help,
              Larry

              Comment


                #8
                Thanks for letting us know. Probably the same underlying bug was what affected that other poster so we linked to two threads.

                Comment

                Working...
                X