I've got a list of values and an extra enum field which holds all those values again (to create a hierarchy).
So columns are: id, role, mainrole (another role id)
The only thing I need to do for the mainrole in SmartGWT in the definition of the DataSource is -sweet-:
Code:
field = new DataSourceEnumField(); field.setForeignKey(this.getID()+".id"); addField(field);
The problem is that the filter on the grid never sees the values (as they are loaded after the grid is drawn),
and when I actually choose an enum, the grid always says "not a valid option" on that column.
I also don't want to see the IDs, but the role text field. I tried using a valueMap instead and built it during fetch, but it gave me the same problem: "not a valid option".
What would be the best way into creating this? If I really need to get the values before drawing the grid, then I would need to destroy and re-draw the grid every time a user adds a new role.