Announcement

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

    Problem filtering SelectItem for cacheAllData datasource

    Hi there,

    i need some help with a set-up i have in my application.

    1. I have a Datasource with cacheAllData="true". It loads all rows fine.

    2. I have a select item to the left in one form, and a form to the right. On load, i set a criteria on the selectitem to only show with the attribute
    "unassigned" set. I do this using an advanced criteria and setOptionCriteria like this:

    Code:
    AdvancedCriteria crit = new AdvancedCriteria(NubaClientServerConstants.FIELD_ASSIGNEDTO, OperatorId.IS_NULL);
    selectItem.setOptionCriteria(crit);
    This works fine on load. All rows are loaded and cached in datasource, but the dropdown only shows the row i want.


    3. when selecting a row in the selectitem, the form is filled up and you can "assign" the value.
    When this happens, i want that row to disappear from the selectitem, since it now IS assigned.

    This is what i have problem with. The item remains even though the attribute is no longer true.

    The only thing i can get to work is by calling fetchData() on the selectitem, but this causes a server fetch! i tried setting various filter attributes, but nothing works.


    Perhaps this is not possible, but what i would like is for the selectitem to "re-evaluate" the criteria somehow without forcing everything to be fetched again from the server - i have already fetched everything!

    Pointers much appreciated.

    #2
    Please provide some basic details:
    1. What version of Smart GWT are you using?
    2. Are both the SelectItem and form using the same DataSource?
    3. Do you expect the selected value to go away from the SelectItem and the drop-list?

    A simple test locally where both the selectItem and form use the same DataSource shows the modified record removed from the selection list automatically.

    A standalone sample based on the BuiltInDS sample might be in order.

    Comment

    Working...
    X