Hi,
What kind of object are you editing? By that I mean, what is the object that makes up the data in your TableView? In your example you don't show any data being set via "tableView.setTableData(List<?> tableData)". Without somewhere to load and store the data there won't be anything saved once your RowEditor finishes. You can use any POJO as long as the bean methods match the row editor names. So, for the description column there should be a bean method "getDescription" and "setDescription", etc. Alternatively, you can use a Map object and then the values would be loaded and saved with the keys being your row editor names (i.e., there would be a values for the keys: "description" and "category").

HTH,
~Roger Whitomb

On 8/13/12 8:02 AM, V SANTOSH PAVAN RAJU Bs wrote:
Hi,
In my application i need to create a from with a tableview in which columns should be created dynamically. So i have created a tableview and columns and now i want to make the tableview rows as editable. for this i use the following code.

tableView = new TableView();
header = new TableViewHeader();

rowEditor.setEditEffect(CardPaneSkin.SelectionChangeEffect.VERTICAL_SLIDE);
tableView.setRowEditor(rowEditor);

columns = new TableView.Column();

columns.setName("description");
columns.setWidth(200);
columns.setHeaderData("Description");

tableView.getColumns().add(columns);

final TextInput descTextInput = new TextInput();
rowEditor.getCellEditors().put("description", descTextInput);

columns = new TableView.Column();
columns.setName("category");
columns.setWidth(120);
columns.setHeaderData("Category");

tableView.getColumns().add(columns);

final TextInput cateTextInput = new TextInput();
rowEditor.getCellEditors().put("category", cateTextInput);

header.setTableView(tableView);
scrollPane.setView(tableView);
scrollPane.setColumnHeader(header);

Here I was able to Edit a row. But After i enter some information in it and rowEditor ends, the entered information was not displayed. When i tried to edit some other row, previous entered information was coming in it.
Please let me know where i was wrong?
--
Thanks & Regards
B.S.V.S.Pavan Raju.
Skype: skype_pavan1
Hyderabad.


Reply via email to