|
|
|
|
Re: Adding rows to tablefield [message #933645 is a reply to message #933489] |
Fri, 05 October 2012 07:48 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
Sebastian Boccardi wrote on Fri, 05 October 2012 05:53The thing is that after the user selected an item, the drop-down disappears and the item appears in the cell, but when you click another cell o press tab or add a new row the item disappears from the cell.
I don't know why.....
At the end of Edition, you need to handle what should occurs with execCompleteEdit. In your case, you probably want to assign the selected value of the smartfiled, as value of the row (for this column).
Here a simple example:
@Order(20.0)
public class StyleColumn extends AbstractSmartColumn<Long> {
@Override
protected String getConfiguredHeaderText() {
return ScoutTexts.get("Style");
}
@Override
protected Class<? extends ICodeType> getConfiguredCodeType() {
return StyleCodeType.class;
}
@Override
protected boolean getConfiguredEditable() {
return true;
}
@Override
protected void execCompleteEdit(ITableRow row, IFormField editingField) throws ProcessingException {
setValue(row, ((ILongField) editingField).getValue());
}
}
We should document editable column, on the Column page in the wiki.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03411 seconds