execCompleteEdit error [message #1842068] |
Tue, 08 June 2021 12:30 |
Mr Robot Messages: 72 Registered: March 2020 |
Member |
|
|
Hello,
I have error when using execCompleteEdit in table.
The error is show when I edit column and click on another editable column directly.
If I edit column and click outside, on table, on header or somewhere else, everything is ok. Problem is only when I edit column and click on another editable column to edit it.
This is code :
@Override
protected void execCompleteEdit(ITableRow row, IFormField editingField) {
IIntegerField valueField = (IIntegerField) editingField;
Integer value = valueField.getValue();
Integer primaryKey= getIDPrimaryKeyColumn().getValue(row);
BEANS.get(IMyService.class).updateColumn(value, primaryKey);
setValue(row, value);
super.execCompleteEdit(row, editingField);
}
This is error from browser console:
ncaught Error: no adapterData found for adapterId=107
at Session.getOrCreateWidget (:8082/eclipse-scout.js:99951)
at TableAdapter._onStartCellEdit (:8082/eclipse-scout.js:111154)
at TableAdapter.onModelAction (:8082/eclipse-scout.js:111249)
at TableAdapter.onModelEvent (:8082/eclipse-scout.js:99130)
at Session._processEvents (:8082/eclipse-scout.js:101254)
at Session._processSuccessResponse (:8082/eclipse-scout.js:100669)
at Session.processJsonResponseInternal (:8082/eclipse-scout.js:100651)
at ResponseQueue.process (:8082/eclipse-scout.js:99603)
at Session.onAjaxDone (:8082/eclipse-scout.js:100457)
at fire (:8082/jquery.js:2921)
This is from Eclipse console:
2021-06-08 14:26:32,103 ERROR [qtp2011986105-24] org.eclipse.scout.rt.ui.html.json.JsonMessageRequestHandler.handleLogRequest(JsonMessageRequestHandler.java:254) - JavaScript exception occured while processing event startCellEdit for adapter Table
We use Scout version 10.0.45
Thank you.
|
|
|
Re: execCompleteEdit error [message #1842071 is a reply to message #1842068] |
Tue, 08 June 2021 12:58 |
|
Hi,
you don't have to call setValue, this is done by the super call. I think your code should look like this:
@Override
protected void execCompleteEdit(ITableRow row, IFormField editingField) {
super.execCompleteEdit(row, editingField);
Integer value = getValue(row);
Integer primaryKey= getIDPrimaryKeyColumn().getValue(row);
BEANS.get(IMyService.class).updateColumn(value, primaryKey);
}
Does it work this way? If not, what does updateColumn do? Does it modify the table? Maybe try it without that line.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03071 seconds