Announcement

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

    Cannot change configuration property 'fieldDataSource'.

    Hi Isomorphic,

    Is there any way we can support dynamic changing of the fieldDataSource on a FilterBuilder?

    Cannot change configuration property 'fieldDataSource' to [DataSource ID:isc_DataSource_3] now that component isc_xxxFilterBuilder_0 has been created.

    SmartClient Version: v10.1p_2016-04-05/Pro Deployment (built 2016-04-05)

    Thanks

    #2
    This is not a trivial change, and it's semantics are unclear. For example, what is the FilterBuilder supposed to do with criteria that are based on fields no longer present in the data returned by the fieldDataSource?

    Re-creating the FilterBuilder with a different fieldDataSource is the most clearly correct approach here.

    Comment


      #3
      The concept is, the form, which includes the FilterBuilder, can display a filter for any DataSource. As a user moves from one record to the next, the DataSource for the "new" filter may change. I believe a long time ago, even changing the DataSource was not feasible after the FilterBuilder was created, however, that of course, was changed and is supported. This allowed us to avoid having to remove the FilterBuilder from the layout, destroy it, and re-create a new one, which seems like a lot of overhead. Up until now, this was sufficient, however, we had to introduce the use of a FieldDataSource under certain cases, and now, as you noted, if we have to change the FieldDataSource, we are re-creating the FilterBuilder.

      To explicitly answer your question relating to the criteria, any time we change the FieldDataSource, we are changing the criteria too.

      I understand the complexity here, and we have a workaround with the re-creation of the FilterBuilder.

      Thanks

      Comment


        #4
        Since the FilterBuilder has to rebuild all internal components to work with a new DataSource and new criteria, there's no significant overhead to creating a new one - that's the right approach here.

        Comment


          #5
          Thank you for the feedback.

          Comment

          Working...
          X