IDEMPIERE-2050 Improvement to Menu Lookup / improve name of sysconfig key
This commit is contained in:
parent
b61adbd398
commit
65591f0ccb
|
@ -42,9 +42,9 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -4290840203977716310L;
|
private static final long serialVersionUID = 2907227045981641758L;
|
||||||
|
|
||||||
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
||||||
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||||
public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO";
|
public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO";
|
||||||
public static final String ALLOW_OVER_APPLIED_PAYMENT = "ALLOW_OVER_APPLIED_PAYMENT";
|
public static final String ALLOW_OVER_APPLIED_PAYMENT = "ALLOW_OVER_APPLIED_PAYMENT";
|
||||||
|
@ -95,7 +95,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
public static final String MAIL_SEND_BCC_TO_FROM = "MAIL_SEND_BCC_TO_FROM";
|
public static final String MAIL_SEND_BCC_TO_FROM = "MAIL_SEND_BCC_TO_FROM";
|
||||||
public static final String MAIL_SEND_CREDENTIALS = "MAIL_SEND_CREDENTIALS";
|
public static final String MAIL_SEND_CREDENTIALS = "MAIL_SEND_CREDENTIALS";
|
||||||
public static final String MAX_ACTIVITIES_IN_LIST = "MAX_ACTIVITIES_IN_LIST";
|
public static final String MAX_ACTIVITIES_IN_LIST = "MAX_ACTIVITIES_IN_LIST";
|
||||||
public static final String MAX_RESULTS_PER_SEARCH = "MAX_RESULTS_PER_SEARCH";
|
public static final String MAX_RESULTS_PER_SEARCH_IN_DOCUMENT_CONTROLLER = "MAX_RESULTS_PER_SEARCH_IN_DOCUMENT_CONTROLLER";
|
||||||
public static final String MENU_INFOUPDATER_SLEEP_MS = "MENU_INFOUPDATER_SLEEP_MS";
|
public static final String MENU_INFOUPDATER_SLEEP_MS = "MENU_INFOUPDATER_SLEEP_MS";
|
||||||
public static final String MFG_ValidateCostsDifferenceOnCreate = "MFG_ValidateCostsDifferenceOnCreate";
|
public static final String MFG_ValidateCostsDifferenceOnCreate = "MFG_ValidateCostsDifferenceOnCreate";
|
||||||
public static final String MFG_ValidateCostsOnCreate = "MFG_ValidateCostsOnCreate";
|
public static final String MFG_ValidateCostsOnCreate = "MFG_ValidateCostsOnCreate";
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class DocumentSearchController implements EventListener<Event>{
|
||||||
|
|
||||||
private static final String SEARCH_RESULT = "search.result";
|
private static final String SEARCH_RESULT = "search.result";
|
||||||
private static final String ON_SEARCH_DOCUMENTS = "onSearchDocuments";
|
private static final String ON_SEARCH_DOCUMENTS = "onSearchDocuments";
|
||||||
private int MAX_RESULTS_PER_SEARCH = 3;
|
private int MAX_RESULTS_PER_SEARCH_IN_DOCUMENT_CONTROLLER = 3;
|
||||||
private Vlayout layout;
|
private Vlayout layout;
|
||||||
private ArrayList<SearchResult> list;
|
private ArrayList<SearchResult> list;
|
||||||
private int selected = -1;
|
private int selected = -1;
|
||||||
|
@ -63,7 +63,7 @@ public class DocumentSearchController implements EventListener<Event>{
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public DocumentSearchController() {
|
public DocumentSearchController() {
|
||||||
MAX_RESULTS_PER_SEARCH = MSysConfig.getIntValue(MSysConfig.MAX_RESULTS_PER_SEARCH, 3, Env.getAD_Client_ID(Env.getCtx()));
|
MAX_RESULTS_PER_SEARCH_IN_DOCUMENT_CONTROLLER = MSysConfig.getIntValue(MSysConfig.MAX_RESULTS_PER_SEARCH_IN_DOCUMENT_CONTROLLER, 3, Env.getAD_Client_ID(Env.getCtx()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void create(Component parent) {
|
public void create(Component parent) {
|
||||||
|
@ -219,7 +219,7 @@ public class DocumentSearchController implements EventListener<Event>{
|
||||||
pstmt.setQueryTimeout(1);
|
pstmt.setQueryTimeout(1);
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
while (rs.next() && count < MAX_RESULTS_PER_SEARCH) {
|
while (rs.next() && count < MAX_RESULTS_PER_SEARCH_IN_DOCUMENT_CONTROLLER) {
|
||||||
count++;
|
count++;
|
||||||
int id = rs.getInt(1);
|
int id = rs.getInt(1);
|
||||||
SearchResult result = new SearchResult();
|
SearchResult result = new SearchResult();
|
||||||
|
|
Loading…
Reference in New Issue