Announcement

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

    clearValue() have no effect on valuesManager.valuesHaveChanged()

    Hello

    1.
    SmartClient Version: SNAPSHOT_v9.0d_2013-05-23/LGPL Development Only (built 2013-05-23)
    SmartClient Version: v9.0d_2013-06-20/LGPL Development Only (built 2013-06-20)


    2. IE8, IE9, FF21

    It looks like neither selectItem.clearValue() no valuesManager.clearValue() do not change valuesManager.valuesHaveChanged() to true.
    What is the correct approach to set selectItem value to null and track this change in related ValuesManager?

    Thanks in advance

    Code:
    final SelectItem productVersionItem = new SelectItem("idProductVersion");
    productVersionItem.setWidth(240);   
    productVersionItem.setOptionDataSource(productVersionDS);   
    productVersionItem.setValueField("idProductVersion");   
    productVersionItem.setDisplayField("fullProductVersionName");   
    productVersionItem.setIcons(clearPicker);
    productVersionItem.setAutoFetchData(false);
    productVersionItem.setPickListFields(vendorNameField, productNameField, productVersionNameField);
    
    final ListGrid productVersionPickList = new ListGrid();
    productVersionPickList.setFilterOnKeypress(true);
    productVersionPickList.setShowFilterEditor(true);
    
    productVersionItem.setPickListProperties(productVersionPickList);
    
    PickerIcon clearPicker = new PickerIcon(PickerIcon.CLEAR,
    		new FormItemClickHandler() {
    			public void onFormItemClick(FormItemIconClickEvent event) {
            		event.getItem().clearValue(); 
    						valuesManager.clearValue(event.getItem().getName());
    			}
    		});
Working...
X