Announcement

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

    Cannot use FilterBuilder's setFieldPickerProperties to use a ComboBoxItem in 6.1

    It seems that setFieldPickerProperties of a FilterBuilder to set a ComboBoxItem as field picker has stopped working in 6.1. I had no problems with this in 6.0. The problem also arises in the following showcase example: https://www.smartclient.com/smartgwt...rid_big_filter. The accompanying text states field pickers would be ComboBoxItems but they aren't.

    I'm currently on v11.1p_2017-07-19/PowerEdition Deployment (built 2017-07-19).

    #2
    This has been fixed for builds dated August 18 and later.

    Comment


      #3
      Thanks for the effort. The showcase example is working again but I still had trouble with my use of FilterBuilder. Did some digging and discovered that in version smartgwt-power-6.0-p20170111 setFieldPickerProperties used getJsObj() on the passed FormItem object. Now in version smartgwt-power-6.1-p20170823, SmartGWT uses getConfig() but this essentially leaves out the "editorType" attribute. In my workaround I changed

      Code:
      ComboBoxItem fieldPickerProperties = new ComboBoxItem();
      fieldPickerProperties.setAddUnknownValues(true);
      fb.setFieldPickerProperties(fieldPickerProperties);
      to

      Code:
      JavaScriptObject fieldPickerProperties = JSOHelper.createObject();
      JSOHelper.setAttribute(fieldPickerProperties, "editorType", "ComboBoxItem");
      JSOHelper.setAttribute(fieldPickerProperties, "addUnknownValues", true);
      JSOHelper.setAttribute(fb.getConfig(), "fieldPickerProperties", fieldPickerProperties);
      where `fb` is the FilterBuilder.

      setAutoChildConstructor("fieldPicker", ...) is useless since no reference is made to `fieldPickerConstructor` in corresponding SmartClient code. I guess a 'editorType:this.fieldPickerConstructor' should be inserted anywhere near ISC_DataBinding.js:84776 like is done in RuleEditor.

      Comment


        #4
        We're looking into this now.

        Comment


          #5
          Thanks for the concise report - this is fixed for builds dated August 26 and later.

          Comment

          Working...
          X