Announcement

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

    editSelectedData + setEditorType in DataSource = Error

    Hello,
    I got a problem when i set the option "setEditorType" to my DataSourceField in my RestDataSource.
    I use a DynamicForm to edit data in my ListGrid. So when I try to edit a record the DynamicForm does not appear. If i remove the option "setEditorType" which i set as i described above everything works fine.
    The reason why I need to add this option is, that i want to bind a optionDataSource to some of the fields.

    The Error-Message in the SC Developer Console:
    22:23:05.724:MUP9:WARN:Log:TypeError: _1.substring is not a function
    Last edited by xelibrety; 28 Feb 2009, 13:24.

    #2
    any ideas?

    Comment


      #3
      what are you setting your editorType to?

      Comment


        #4
        completely doesn't matter. i tried a simple TextAreaItem and also many other different kinds of FormItem. always the same error.

        Comment


          #5
          u don't need a dynamicForm to edit cells. Just put a setEditor (with proper method) on the listgridfield you want to be editable.

          Regards

          Comment


            #6
            i know the option to edit data inside a grid, but it have to be in a dynamic form.

            Comment


              #7
              I think i understand what you want to do.
              But for that you don't have to use setEditor method :

              just create your DynamicForm with your items and just put the same name for the items than the name of your field in your datasource. The binding will be automatic as soon as you add the setOptionDataSource to your form.

              I think it should solve your issue ;)

              Regards

              Comment


                #8
                wow this really seems to work:)

                thank you very much!

                Comment


                  #9
                  what is this setOptionDataSource? I cannot find any method on form

                  * found on SelectItem
                  Last edited by jamesgt; 20 Mar 2009, 13:00.

                  Comment


                    #10
                    I'm having the same issue. In my datasource I have two fields, one with a date and another with a time. I could have used the DateTimeField but it translates to a simple text field and I want to put a datapicker to select the date. As there is no TimeField, I have created the following:

                    Code:
                    DataSourceDateField startDateField = new DataSourceDateField("startDate", "Start date");
                    DataSourceDateField startTimeField = new DataSourceDateField("startTime", "Start time");
                    startTimeField.setEditorType(new TimeItem());
                    But when I try to create the dynamic form from my datasource, I get the above message. I tried setting startTimeField to a TextField but the result is the same.

                    Comment


                      #11
                      Fixed DataSourceField.setEditorType in SVN.

                      Comment

                      Working...
                      X