Announcement

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

    DynamicForms without dataSource managed by ValuesManager with ds give warnings

    SmartClient Version: SNAPSHOT_v11.1d_2017-03-13/Enterprise Development Only (built 2017-03-13)

    Chrome on OSX

    Hello, please try this test case:
    Code:
    isc.DynamicForm.create({ 
        ID: "dynamicForm",
        items:[{name:"itemName"}]
    });
    
    isc.DynamicForm.create({ 
        ID: "dynamicForm2",
        top: 50,
        items:[{name:"SKU"}]
    });
    
    isc.ValuesManager.create({
        dataSource: "supplyItem",
        members: [dynamicForm, dynamicForm2]
    });
    You'll see these warnings:
    Code:
    15:47:43.146:MUP4:WARN:DynamicForm:dynamicForm:destroyed FormItem passed to setItems()/addItem(): FormItems cannot be re-used with different DynamicForms
    15:47:43.159:MUP4:WARN:DynamicForm:dynamicForm2:destroyed FormItem passed to setItems()/addItem(): FormItems cannot be re-used with different DynamicForms
    But I'm not re-using FormItems. If I specify the dataSource also on the DynamicForms, the warnings doesn't show.

    #2
    There is a documented requirement that if you apply a DataSource to a valuesManager, you apply the same DataSource to each member form.
    From here:

    Like a DynamicForm, a ValuesManager can be databound by setting ValuesManager.dataSource. In this case all member forms must also be bound to the same DataSource.
    This requirement is perhaps unnecessary - it may be reasonable to have the member forms automatically infer their DataSource from the ValuesManager, and we may make this change in the future, but for now, specifying the dataSource at the form level as well as at the ValuesManager level is appropriate.

    Regards
    Isomorphic Software

    Comment


      #3
      Ok, thanks for the heads up!

      Comment

      Working...
      X