I am working on a GWT/GXT project and I need to have an editable listview like I can do an editable grid (with InlineGridEditing or RowGridEditing). Basically, I wish to have a Textfield appear in my listView when I double click on one row. I have made some research on the subject but I couldn't find anything. Does anybody know if this is possible or should I just use an editable grid with only one colomn?
Here is my listview code:
final String256Properties props = GWT.create(String256Properties.class);
// init list tools
listView = new ListView<String256, String>(new ListStore<String256>(props.key()), props.string());
listView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
values = new ListStoreEditor<String256>(listView.getStore());
///////////////////////
// --BuildUI
///////////////////////
////////////////////////
// -- BindUI
////////////////////////
It gets me that:
And I want each row to be editable on click.
Thank you.
Out of the box, this is not supported - the ListView is just a lightweight way to draw the items, with an optional cell.
You can get close by specifying a cell for the listview that can edit the string, but it won't have the 'click to edit' thing.
Instead, consider using the Grid, with just a single ColumnConfig, and hide the headers. Then you can use the normal grid editing features, and edit the data as you want. The ListStoreEditor will still bind correctly, and you'll have any other grid feature that you might someday want already at your fingertips.