|
Re: Listen for changes of the checked state in the embedded table of an AbstractTableField [message #1042737 is a reply to message #1042295] |
Tue, 16 April 2013 20:22 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
Hi,
Thanks for your question.
I look at the code and figured out that the number of checked rows is not considered when the table field computes if it contains modifications or not.
To add this behavior, you can override execIsSaveNeeded() in your table field:
@Override
protected boolean execIsSaveNeeded() throws ProcessingException {
boolean b = super.execIsSaveNeeded();
if (b == false && getTable().getCheckedRows().length > 0) {
b = true;
}
return b;
}
In my opinion this can be explained: per default, eclipse scout does not consider checked rows in table for "IsSaveNeeded", because from a persistence point of view this "checked/not checked" state is not relevant. It is not transferred to the FormData.
You need to do something with the "checked/not checked" information by yourself (it is your business logic). Therefore you also need to implement how your TableField should react with this information.
[Updated on: Tue, 16 April 2013 20:24] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03177 seconds