Infowindow:Previous recordSelectedData don't clear before process run
Description
Environment
- 01 Jun 2016, 06:01 AM
Hiep Lq
hi @Peter Shepetko like i mean on prev comment, i worry your fix will get break IDEMPIERE-2230.
did you test it? or you just don't use this feature?
my patch already fix your issue with no break anything.
if you still get issue when apply my patch, please point out me with your test case, so i can improve my patch.
Peter Shepetko
Hi Hieplq,
Can you check it?
I added one line to class InfoPanel and it work as we need:
-------------
@Override
public void onEvent(Event event) throws Exception {
ProcessModalDialog processModalDialog = (ProcessModalDialog)event.getTarget();
if (DialogEvents.ON_BEFORE_RUN_PROCESS.equals(event.getName())){
+ recordSelectedData.clear();//#IDEMPIERE-3094
updateListSelected();
// store in T_Selection table selected rows for Execute Process that retrieves from T_Selection in code.
DB.createT_SelectionNew(pInstanceID, getSaveKeys(getInfoColumnIDFromProcess(processModalDialog.getAD_Process_ID())),
null);
-------------
Hiep Lq
hi @Peter Shepetko i misunderstand your idea in "But we can reset recordSelectedData before this process will start because old items exist recordSelectedData and process will run for them too. But it is mistake for us."
and i still not yet know how to redo like you
Peter Shepetko
Yes, I agree to you about un-select records at other pages if we reset recordSelectedData always.
But we can reset recordSelectedData before this process will start because old items exist recordSelectedData and process will run for them too. But it is mistake for us.
Hiep Lq
i can't redo this issue when i apply patch.
if you reset recordSelectedData it will affect IDEMPIERE-2230. selected record at other pages also un-select
i just think one condition to redo, your process change data of selected record, is it?

Step-byStep:
1) We selected 2 records
2) We run some process
3) We selected another 3 records
4) We run the same process again
5) Process did 5 records (2+3) and selected 5 records in infowindow
This is mistake!
Solution:
We added one line to package org.adempiere.webui.panel.InfoPanel.InfoPanel
updateListSelected(){
+ recordSelectedData.clear();
...
}