Announcement

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

    Filtering not working for new Isomorphic version in select item having listgrid as picklistfield

    Hi Isomorphic;

    My application is using SmartGWT + Spring + Hibernate.

    Working version : 6.0-p20170211

    Not working version : 6.1-p20170905

    I am using a ListGrid(DataBound Component) inside selectItem for displaying the list of records in one of my application pages.

    final SelectItem attrItem = new SelectItem();
    attrItem.setPickListWidth(450);
    final DataSource productLineAttrDataSource = DataSource.get(ClientConstants.HARDWARE_ATTRIBUTES_DS);
    final ListGrid userSelectProperties = new ListGrid();
    userSelectProperties.setShowFilterEditor(true);
    userSelectProperties.setFilterOnKeypress(true);
    //userSelectProperties.setSelectionAppearance(SelectionAppearance.ROW_STYLE);
    attrItem.setSortField(0);
    userSelectProperties.setDataFetchMode(FetchMode.PAGED);
    userSelectProperties.setDataPageSize(1);
    userSelectProperties.setShowAllRecords(false);
    ListGridField attributeDescField = new ListGridField(ATTRIBUTE_DESCRIPTION_FIELD);
    attributeDescField.setTitle(VIEW_MESSAGE.attr_type());
    attributeDescField.setWidth(120);
    HardwareAttributesViewHelper.getFilterDropdownForAttributeTypeClass(attributeDescField);
    ListGridField printCodeField = new ListGridField(HARDWARE_ATTR_DS_PRINT_CODE,
    VIEW_MESSAGE.print_code_label());
    printCodeField.setMultiple(true);
    printCodeField.setWidth("25%");
    ListGridField printDescriptionField = new ListGridField(HARDWARE_ATTR_DS_PRINT_DESCRIPTION,
    VIEW_MESSAGE.descripiton_label());
    printDescriptionField.setWidth("75%");
    printDescriptionField.setShowHover(true);

    String hardwareLineId = context.getEditedRecord().getAttribute("hardwareLineId");
    final Criteria criteria = new Criteria();
    criteria.addCriteria(ClientConstants.PRICEBOOK_ID, priceBookId);
    criteria.addCriteria(IS_FROM_HARDWARE_PRICEBOOK_GRID, true);
    criteria.addCriteria("hardwareLineId", hardwareLineId);

    attrItem.setPickListFilterCriteriaFunction(new FormItemCriteriaFunction() {

    @Override
    public Criteria getCriteria(FormItemFunctionContext itemContext) {
    String criteriaCondition =HARDWARE_TYPE_ID_FIELD;
    String hardwareTypeId = "-1";
    if (HardwareLineView.priceBookGrid.getEditedCell(HardwareLineView.priceBookGrid.getEditRow(),
    ClientConstants.HARDWARE_TYPE_ID_FIELD) != null) {
    hardwareTypeId = HardwareLineView.priceBookGrid.getEditedCell(HardwareLineView.priceBookGrid.getEditRow(),
    ClientConstants.HARDWARE_TYPE_ID_FIELD).toString();
    }
    criteria.addCriteria(criteriaCondition, hardwareTypeId);
    return criteria;
    }
    });

    attrItem.setOptionDataSource(productLineAttrDataSource);
    attrItem.setOptionCriteria(criteria);
    attrItem.setMultiple(true);
    attrItem.setAutoFetchData(false);
    attrItem.setDisplayField("Hardware");
    attrItem.setValueField("Hardware");
    attrItem.setPickListFields(attributeDescField, printCodeField, printDescriptionField);
    attrItem.setPickListProperties(userSelectProperties);

    I am able to do filter on listgrid in previous version of Isomorphic(6.0-p20170211) but filter is now not working in new version( 6.1-p20170905)

    Can you please help me on this thing?

    #2
    The first thing to do is update to the very latest build of 6.0 from smartclient.com/builds - if you still see issues, let us know.

    Comment


      #3
      We are using the isomorphic-version 6.1-p20170701. Ideally, the fix for this should be available in the 6.1 build we are using. It is not possible for us to go back and check the fix on the latest build of 6.0. Please let us know when can we text the fix in the 6.1 build?

      Comment


        #4
        Apologies for the typo - obviously we meant that you should update to the latest build of 6.1, if that's what you're using.

        Comment

        Working...
        X