Announcement

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

    Issues while Upgrading Smartgwt 5.0 to 6.0

    Hi ,
    Recently i upgraded my application from SmartGWT 5.0 to 6.0 and found that below api has been removed
    API Classes API Method
    DataSourceField getRequired()
    TimeItem setLength
    DynamicForm setFields()
    What is the replacement for the above api method?

    #2
    A quick check reveals that all the methods you mention are still present in SGWT 6.0p. The method setLength() is actually defined on TextItem rather than TimeItem (that hasn't changed), but should be available from any subclass, including TimeItem.

    Comment


      #3
      Thanks Isomorphic for your response.
      1.I Found that TimeItem is extending FormItem class where setLength() is not present(in older version TimeItem is extending TextItem where setLength() method is present). what is the workaround for this?
      2.In DynamicForm , i have used setFields(); without any parameter its giving me this error
      [ERROR] both method setFields(com.smartgwt.client.widgets.form.fields.FormItem...) in com.smartgwt.client.widgets.form.DynamicForm and method setFields(com.google.gwt.c
      ore.client.JavaScriptObject...) in com.smartgwt.client.widgets.form.DynamicForm match. How to fix this?
      3. In DataSourceField API, ealier i was checking getRequired()!=null , which is not necessary in newer version(i fixed it).

      Comment


        #4
        Has this issue with TimeItem no longer supporting the setLength method been resolved. It is missing from 5.1-p20161001

        Comment


          #5
          What behavior are you hoping for from "setLength()" on a TimeItem?

          TimeItem used to extend TextItem, but now has two modes (a TextItem like before, and now a new mode with drop-downs for picking HMS). With this new functionality, the setLength() API would need to be called on the "textField" AutoChild, but calling setLength() has no useful function so far as we can see.

          Comment


            #6
            OK, what do I use to setLength(2) We are using this to set the number of characters that can be entered into this field.

            Comment


              #7
              Yes, that's what setLength() does :) What's the purpose of restricting to two characters, are you trying to allow hour input only, something like that?

              Comment


                #8

                Ah, now I understand your question...yes, that is exactly what we are doing.

                "TimeItem used to extend TextItem, but now has two modes (a TextItem like before, and now a new mode with drop-downs for picking HMS). With this new functionality, the setLength() API would need to be called on the "textField" AutoChild, but calling setLength() has no useful function so far as we can see. "

                Can/would you give me a code snippet to understand how to do what you are saying in the quote?
                Last edited by siegersallee; 4 Oct 2016, 13:29.

                Comment

                Working...
                X