IDEMPIERE-3185 NPE on WPreference
This commit is contained in:
parent
89ba2d67e3
commit
084f20bc24
|
@ -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;
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue