IDEMPIERE-3185 NPE on WPreference

This commit is contained in:
Carlos Ruiz 2016-09-06 12:41:20 +02:00
parent 89ba2d67e3
commit 084f20bc24
2 changed files with 8 additions and 4 deletions

View File

@ -63,7 +63,7 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
/**
*
*/
private static final long serialVersionUID = 6033101081045706748L;
private static final long serialVersionUID = -8530102231615195037L;
public static final String QUICK_ENTRY_MODE = "_QUICK_ENTRY_MODE_";
@ -85,7 +85,7 @@ public class WQuickEntry extends Window implements EventListener<Event>, ValueCh
private ConfirmPanel confirmPanel = new ConfirmPanel(true, false, false, false, false, false);
private int m_AD_Window_ID;
protected int m_AD_Window_ID;
private boolean isHasField = false;
/**

View File

@ -22,6 +22,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WYesNoEditor;
import org.adempiere.webui.grid.WQuickEntry;
import org.adempiere.webui.theme.ThemeManager;
import org.compiere.model.MRole;
import org.compiere.model.MUserPreference;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@ -65,8 +66,11 @@ public class WPreference extends WQuickEntry implements EventListener<Event> {
log.log(Level.SEVERE, ex.getMessage());
}
Boolean canAccessPreference = MRole.getDefault().getWindowAccess(m_AD_Window_ID);
if (canAccessPreference != null && canAccessPreference) {
initPOs();
loadPreferences();
}
this.setTitle("");
} //WPreference