IDEMPIERE-236 Centralization of hardcoded IDs / using naming convention for constants
This commit is contained in:
parent
b0c67e8897
commit
a53fd5c08f
|
@ -23,9 +23,8 @@ package org.compiere.model;
|
|||
|
||||
public class HardCodedIDs {
|
||||
|
||||
public static int referencePostingType = 125;
|
||||
|
||||
|
||||
public static int windowMyRequests = 237;
|
||||
public final static int REFERENCE_POSTING_TYPE = 125;
|
||||
|
||||
public final static int WINDOW_MY_REQUESTS = 237;
|
||||
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ class AcctViewerData
|
|||
*/
|
||||
protected void fillPostingType (JComboBox cb)
|
||||
{
|
||||
int AD_Reference_ID = HardCodedIDs.referencePostingType;
|
||||
int AD_Reference_ID = HardCodedIDs.REFERENCE_POSTING_TYPE;
|
||||
ValueNamePair[] pt = MRefList.getList(Env.getCtx(), AD_Reference_ID, true);
|
||||
for (int i = 0; i < pt.length; i++)
|
||||
cb.addItem(pt[i]);
|
||||
|
|
|
@ -688,7 +688,7 @@ public final class AMenu extends CFrame
|
|||
// + " INNER JOIN AD_TABLE t ON (t.AD_Window_ID=m.AD_Window_ID) "
|
||||
// + "WHERE t.AD_Table_ID=?", 417);
|
||||
if (m_request_Menu_ID == 0)
|
||||
m_request_Menu_ID = HardCodedIDs.windowMyRequests; // My Requests
|
||||
m_request_Menu_ID = HardCodedIDs.WINDOW_MY_REQUESTS; // My Requests
|
||||
(new AMenuStartItem (m_request_Menu_ID, true, Msg.translate(m_ctx, "R_Request_ID"), this)).start(); // async load
|
||||
} // gotoRequests
|
||||
|
||||
|
|
Loading…
Reference in New Issue