Announcement

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

    SmartClient 8.3p ValuesManager.resetValues()

    Hi,

    We just migrated to the latest SmartClient 8.3p and we're having a scripting error when
    we call resetValues() on a valuesManager. The clearing action gets triggered thru one of
    the form's hyperlink fields, via a click action.

    This happens on Chrome only (works in IE and FireFox). Following is the call stack when
    this problem occurs. Any ideas ?

    Thanks,

    Code:
    Uncaught Error: NotFoundError: DOM Exception 8 ISC_Forms.js:1586
    isc_LinkItem_setElementValue ISC_Forms.js:1586
    isc_FormItem__setElementValue ISC_Forms.js:818
    isc_FormItem_setValue ISC_Forms.js:787
    isc_c_Class_invokeSuper ISC_Core.js:245
    isc_TextItem_setValue ISC_Forms.js:1282
    isc_FormItem_clearValue ISC_Forms.js:816
    isc_DynamicForm_clearValue ISC_Forms.js:263
    isc_ValuesManager__setMemberValues ISC_Forms.js:2009
    isc_ValuesManager_setValues ISC_Forms.js:1986
    isc_ValuesManager_resetValues ISC_Forms.js:1988
    BaseCriteria.addProperties.clearFormValues baseCriteria.js:524
    BaseCriteria.addProperties.showAdvancedSearch baseCriteria.js:348
    baseProperties.handleClick baseCriteria.js:63
    isc_LinkItem__linkClicked ISC_Forms.js:1582
    onclick

    #2
    At the moment that you make this call, has the form either been clear()d (check with isDrawn()) or is it perhaps already destroy()d (check with component.destroyed)?

    Comment


      #3
      Our use case is the following: we have a VLayout in which we add() a "basic" search form (DynamicForm). That search form
      contains an "advanced" hyperlink. When the user clicks on that hyperlink, we call the "clearFormValues()" method below. Upon
      returning from that method, we remove() the "basic" search form from the layout (without destroying it per say) and create a
      new "advanced" search form that we add() to our VLayout.

      This pattern used to work with 8.2p but is now giving us issues (in Chrome only) when we call resetValues() on the valuesManager.

      When inspecting, prior to calling resetValues, the isDrawn() method does return TRUE for members bound to our valuesManager. As
      for the "destroyed" attribute, that is "undefined" (not sure if it should have been anything else?)

      Code:
      	clearFormValues : function()
      	{
      		if (this.valuesManager)
      		{
      			this.valuesManager.resetValues();
      			this.valuesManager.clearErrors(true);
      		}
      
      		if (this.actionTarget && this.actionTarget.valuesManager)
      		{
      			this.actionTarget.valuesManager.clearValues();
      			this.actionTarget.valuesManager.clearErrors(true);
      		}
      	},
      Last edited by yavery; 3 Jun 2013, 23:36.

      Comment


        #4
        Hi,
        We have made a minor change which may address this for you - please try the next nightly build (dated June 5).
        If that doesn't take care of it, we'll need a way to reproduce the problem.

        Probably the best thing to do would be to distill the essence of your usage down to a simple script that we can run (EG something we can drop into the feature explorer), which sets up the same basic set of widgets (DynamicForm, valuesManager, etc) and reproduces the problem.

        Thanks
        Isomorphic Software

        Comment


          #5
          Unfortunately, The problem is still there with the latest release (8.3p 06/05). I'm also not able to isolate a
          simple-enough scenario to easily reproduce in Feature Explorer.

          I did trace the code, step-by-step, and the error comes up immediately after returning from the following method:

          Code:
           _nativeBlurHandler : function () {
                  // Check for blur being fired on page unload (when the isc object is out of scope)
                  if (!window.isc || !isc.DynamicForm) return;
          
                  isc.EH._setThread("IBLR");
                  var result;
                  if (isc.Log.supportsOnError) {
                      result = isc.FormItem.__nativeBlurHandler(this);
                  } else {
                      try {
                          result = isc.FormItem.__nativeBlurHandler(this);
                      } catch (e) {
                          isc.Log._reportJSError(e);
                      }
                  }
                  isc.EH._clearThread();
                  return result;
                  // AFTER RUNNING THIS LINE, I GET THE SCRIPTING ERROR (IN CHROME ONLY)
              },
          Does that help in any way in identifying why this is happening on Chrome only?

          Thanks,
          Last edited by yavery; 5 Jun 2013, 06:35.

          Comment


            #6
            Have you been able to try the new build to see if it resolves the issue?

            Comment


              #7
              Yes. As my reply message stated, I tried with the latest build and I still get a scripting error, unfortunately.

              Comment


                #8
                We have found a way to reproduce the problem and are looking into it.

                Regards
                Isomorphic Software

                Comment


                  #9
                  We believe we've resolved this issue. Please try the next nightly build, dated June 7 or above

                  Regards
                  Isomorphic Software

                  Comment


                    #10
                    Indeed, that issue is now resolved with the 06/07 8.3p build.

                    Thanks,

                    Comment

                    Working...
                    X