Announcement

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

    FormItem looks corrupted after swithcing to v10.0p_2015-06-03

    It looks to me that
    com.smartgwt.client.widgets.form.fields.FormItem looks corrupted after switching to SmartClient Version: v10.0p_2015-06-03/Enterprise Deployment (built 2015-06-03)

    2 cases below worked fine in prev version:
    1. java call 'item.redraw()' // now gives js exception: 'identified is not a function'

    2. JavaScriptObject val= (JavaScriptObject) itemSelected.getValue(); // now gives Clast Cast Eception

    /*both 'item' & 'itemSelected' declared as FormItem*/

    Also, very strange, when debugging through in Super Dev Mode in Chrome, in some places it doesn't allow even
    set a breakpoint if 'if' condition contains FromItem:

    if(item.getName().contains("Quarter")){
    yearItemName = formItemName+"Year"; // breakpoint is not allowed on this line
    // and code never gets here even when condition is true
    }

    Is it possible that v10.0p_2015-06-03/Enterprise Deployment (built 2015-06-03) contains a bug?

    This is licensed version for a major bank. Is there any way to track down what cause this?

    #2
    Basic problems like this would crash countless Showcase examples and automated tests, but they are all working normally. And we have no other reports of issues like this.

    Most likely your project is corrupt in some way. You might try clearing your GWT unitcache and re-running a GWT compile.

    If steps to fix your project don't seem to help and you believe this is a framework issue, try creating a minimal, ready-to-run test case demonstrating the issue.

    Comment


      #3
      I drilled down to the code where it happens.
      FormItem.getValue() instead of returning JavaScriptObject returns... ArrayList!
      In similar situation, when the value is retrieved from event handler (event.getValue()) it works fine; when it retrieved from item (FormItem.getValue() ) it's ArrayList. But it's set to 'fields' as JSO.
      Any idea how can it possible?

      Comment


        #4
        That would happen if the item is marked multiple:true, since such items must have an Array as the value.

        Comment


          #5
          Array is ok, I think the problem is that this is Java ArrayList, not Array.
          There's check on GWT side that fails any JAVA SPECIFIC TYPE, like ArrayList.
          I think it doesn't fail an Array as there's Array in JS side as well

          Comment


            #6
            Sorry, that didn't make any sense to us. It looks like you are talking about issues elsewhere in your own code, not in the framework.

            The value will be returned from getValue() as an ArrayList. There are other getValueAs{Something} signatures if you need it in a different format.

            Comment


              #7
              So, you're saying that FormItem.getValue() SHOULD return ArrayList? Not just Array?

              Comment


                #8
                I mean "SHOULD return object CASTABLE to ArrayList?"

                Comment


                  #9
                  Sorry for the delay, this question was misfiled.

                  You could get either a List or RecordList depending on whether the base type is a SimpleType (List) or a DataSource (RecordList).

                  In the SimpleType case where a List is returned, it's not safe to cast to a concrete implementation like ArrayList. You should only assume it implements List.

                  Comment

                  Working...
                  X