31 Oct 2010 6:46 AM #1
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
By TheBuzzer in forum Ext GWT: DiscussionReplies: 4Last Post: 14 Apr 2010, 11:32 AM
By danthehitman in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 19 Dec 2007, 1:36 PM
By rizakoyt in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 28 Feb 2007, 6:37 PM