Idempiere-364 Fixing grid refreshing issue after customization.
This commit is contained in:
parent
cdf2d1ef07
commit
da2893b14e
|
@ -2533,11 +2533,8 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
|
|||
gridFieldIds.add(fields[i].getAD_Field_ID());
|
||||
|
||||
}
|
||||
if (CustomizeGridViewDialog.showCustomize(0, curTab.getAD_Tab_ID(), columnsWidth,gridFieldIds)) {
|
||||
|
||||
if (tabPanel.getGridView() != null) {
|
||||
tabPanel.getGridView().reInit();
|
||||
}
|
||||
}
|
||||
CustomizeGridViewDialog.showCustomize(0, curTab.getAD_Tab_ID(), columnsWidth,gridFieldIds,tabPanel.getGridView());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import java.util.logging.Level;
|
|||
import org.adempiere.model.MTabCustomization;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.Checkbox;
|
||||
import org.adempiere.webui.component.GridPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.ListHead;
|
||||
import org.adempiere.webui.component.ListHeader;
|
||||
|
@ -67,6 +68,7 @@ public class CustomizeGridViewPanel extends Panel
|
|||
private static final long serialVersionUID = 4289328613547509587L;
|
||||
private Map<Integer, String> m_columnsWidth;
|
||||
ArrayList<Integer> tableSeqs;
|
||||
GridPanel gridPanel = null;
|
||||
/**
|
||||
* Sort Tab Constructor
|
||||
*
|
||||
|
@ -562,6 +564,9 @@ public class CustomizeGridViewPanel extends Panel
|
|||
m_saved = true;
|
||||
FDialog.info(m_WindowNo, null, "Saved");
|
||||
getParent().detach();
|
||||
if(gridPanel!=null){
|
||||
gridPanel.reInit();
|
||||
}
|
||||
} else {
|
||||
FDialog.error(m_WindowNo, null, "SaveError", custom.toString());
|
||||
}
|
||||
|
@ -760,5 +765,8 @@ public class CustomizeGridViewPanel extends Panel
|
|||
public boolean isSaved() {
|
||||
return m_saved;
|
||||
}
|
||||
public void setGridPanel(GridPanel gridPanel){
|
||||
this.gridPanel = gridPanel;
|
||||
}
|
||||
} //ADSortTab
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.Map;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.GridPanel;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.panel.CustomizeGridViewPanel;
|
||||
import org.compiere.util.Env;
|
||||
|
@ -50,15 +51,20 @@ public class CustomizeGridViewDialog extends Window {
|
|||
return customizePanel.isSaved();
|
||||
}
|
||||
|
||||
public void setGridPanel(GridPanel gridPanel){
|
||||
customizePanel.setGridPanel(gridPanel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show User customize (modal)
|
||||
* @param WindowNo window no
|
||||
* @param AD_Tab_ID
|
||||
* @param columnsWidth
|
||||
*/
|
||||
public static boolean showCustomize (int WindowNo, int AD_Tab_ID, Map<Integer, String> columnsWidth,ArrayList<Integer> gridFieldIds)
|
||||
public static boolean showCustomize (int WindowNo, int AD_Tab_ID, Map<Integer, String> columnsWidth,ArrayList<Integer> gridFieldIds,GridPanel gridPanel)
|
||||
{
|
||||
CustomizeGridViewDialog customizeWindow = new CustomizeGridViewDialog(WindowNo, AD_Tab_ID, Env.getAD_User_ID(Env.getCtx()), columnsWidth,gridFieldIds);
|
||||
customizeWindow.setGridPanel(gridPanel);
|
||||
AEnv.showWindow(customizeWindow);
|
||||
return customizeWindow.isSaved();
|
||||
} // showProduct
|
||||
|
|
Loading…
Reference in New Issue