-
4 Dec 2012 12:12 PM #1
How do I make multiple editors
How do I make multiple editors
If you could provide some editor driver concept to implement multiple editors based on the flavor of the application need, it may be same model, or with multiple models (composite key) associated.
I really appreciate if you could provide some details or throw some light on this.
-
4 Dec 2012 12:36 PM #2
Lets say an example if you have list grid with parent model, upon selection of the row editor be initialized with child model. As I have tab deck upon selection of the row, each tab deck is associated with one model.
-
5 Dec 2012 7:05 AM #3
I'm not sure how tabs fit into that picture, but there are several GXT examples using editors and drivers to wire up data, and some of those feed off of selection in a Grid/ListStore/Tree.
Given an item's selection in a grid, allow user to edit it:
http://www.sencha.com/examples/#Exam...ce:gridbinding
Edit an object, including a list property in it:
http://www.sencha.com/examples/#Exam...ropertybinding
Given an item's selection in a tree, allow the user to edit it:
http://www.sencha.com/examples/#Exam...factorybinding
To get a better look at nested editors, check out the GWT documentation on this feature - all of this works exactly the same with GXT 3.
https://developers.google.com/web-to...GuideUiEditors
-
5 Dec 2012 7:14 AM #4
Thanks Colin. Hopefully these examples would certainly help me to understand better to implement in our current project.
-
5 Dec 2012 11:18 AM #5
I could not find an example for PersonPK Composite Key having three unique columns are mapped as Id with PersonProxy, for editor.
Would you please throw an idea on this
-
5 Dec 2012 12:45 PM #6
-
5 Dec 2012 12:58 PM #7
yes, this is the one, ID (i.e. ModelKeyProvider) is based on the contents of three different values in the row
-
5 Dec 2012 1:42 PM #8
As with ValueProvider and nulls in intermediate, the PropertyAccess builder can't read your mind to see what you want. Instead, just as with ValueProvider, implement your own with your specific behavior:
Remember the JavaDoc for getKey: "Gets a non-null key value that maps to this object. Keys must be consistent and unique for a given model, as a database primary key would be used." (emphasis mine).Code:class MyCompositeModelKeyProvider implements ModelKeyProvider<MyData> { public String getKey(MyData object) { //TODO make and return a String that represents the key for this object. } }
-
5 Dec 2012 2:10 PM #9


Reply With Quote