It seems to me that there is no obvious way to bind an attribute ( a collection of BeanModel) to a DualListField.
An example :
The DualListField has a store of BeanModel (A, B, C) in the left panel where A,B,C are a list of available rights.
The BeanModel class i want to bind to my FormPanel has an attribute "rights" which is a list of BeanModels A, C
I bind my BeanModel class to the FormPanel.
According to me, A & C should be moved to the right panel of the DualListField (they are selected).
B should be the only model left in the left panel (not selected).
Is it ok so far ?
I've been trying to implement that behaviour in a DualListFieldBinding class which extends FieldBinding but i can't do the moving process in the onConvertModelValue method.
I could do something with overriding the setValue method of DualListField where i did the moving process, but i sometimes ran into ugly pojo/BeanModel ClassCastException which seem coming from limited support for nested lists of beans.
Before going any further, i'd like to know what is the correct way to do it and i'd like to raise a more general problem :
How to bind easily an ModelData attribute which is a collection of ModelData to a complexe Field which can display a list of selected elements among a list of available elements ( DualListField, CheckBoxListView ...) ?
It's a recurrent problem in our web application and we still don't have a nice way to solve it.
It looks like something missing in the GXT's binding i'm a huge fan of. But i hope i'm wrong
Thanks in advance