Announcement

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

    Can't get listgrid filter to work with foreign key field.

    I have a listgrid with a couple of fields. One field in the datasource is a foreign key field to another datasource, like this:

    Code:
    <field name="locationId" type="integer" foreignKey="location.id" required="true" combo="false" hidden="true"/>
    I have a dropdown above the grid, with name as title and "locationId" as value. When i select from the list i have a handler that sets a criteria on the grid like this:
    Code:
      
    Criteria filter = new Criteria();
    filter.addCriteria("locationId", filterVal);
    filterGrid.filterData(filter);
    The "filterVal" is an int, i have done GWT.log and it has the correct value and matches a couple of rows in the listgrid. What happens however, is that the grid becomes totally empty. Haven't looked at this in a long time, so pointers to what i'm doing wrong are appreciated.

    #2
    turns out the id wasn't set with the correct type. Got it working.

    Comment

    Working...
    X