Minor info product window search enhancement.
This commit is contained in:
parent
b9e40c4bf4
commit
5832e19b79
|
@ -356,7 +356,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
||||||
protected WListbox contentPanel = new WListbox();
|
protected WListbox contentPanel = new WListbox();
|
||||||
protected Paging paging;
|
protected Paging paging;
|
||||||
protected int pageNo;
|
protected int pageNo;
|
||||||
private int m_count;
|
protected int m_count;
|
||||||
private int cacheStart;
|
private int cacheStart;
|
||||||
private int cacheEnd;
|
private int cacheEnd;
|
||||||
private boolean m_useDatabasePaging = false;
|
private boolean m_useDatabasePaging = false;
|
||||||
|
@ -656,7 +656,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
||||||
* Test Row Count
|
* Test Row Count
|
||||||
* @return true if display
|
* @return true if display
|
||||||
*/
|
*/
|
||||||
private boolean testCount()
|
protected boolean testCount()
|
||||||
{
|
{
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
String dynWhere = getSQLWhere();
|
String dynWhere = getSQLWhere();
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener
|
||||||
//
|
//
|
||||||
initComponents();
|
initComponents();
|
||||||
init();
|
init();
|
||||||
initInfo (value, M_Warehouse_ID, M_PriceList_ID);
|
initInfo (M_Warehouse_ID, M_PriceList_ID);
|
||||||
m_C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), windowNo, "C_BPartner_ID");
|
m_C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), windowNo, "C_BPartner_ID");
|
||||||
|
|
||||||
int no = contentPanel.getRowCount();
|
int no = contentPanel.getRowCount();
|
||||||
|
@ -203,6 +203,14 @@ public class InfoProductPanel extends InfoPanel implements EventListener
|
||||||
// AutoQuery
|
// AutoQuery
|
||||||
if (value != null && value.length() > 0)
|
if (value != null && value.length() > 0)
|
||||||
{
|
{
|
||||||
|
// Set Value or Name
|
||||||
|
fieldValue.setText(value);
|
||||||
|
testCount();
|
||||||
|
if (m_count <= 0) {
|
||||||
|
fieldValue.setText("");
|
||||||
|
fieldName.setValue(value);
|
||||||
|
}
|
||||||
|
|
||||||
executeQuery();
|
executeQuery();
|
||||||
renderItems();
|
renderItems();
|
||||||
}
|
}
|
||||||
|
@ -609,20 +617,14 @@ public class InfoProductPanel extends InfoPanel implements EventListener
|
||||||
/**
|
/**
|
||||||
* Dynamic Init
|
* Dynamic Init
|
||||||
*
|
*
|
||||||
* @param value value
|
|
||||||
* @param M_Warehouse_ID warehouse
|
* @param M_Warehouse_ID warehouse
|
||||||
* @param M_PriceList_ID price list
|
* @param M_PriceList_ID price list
|
||||||
*/
|
*/
|
||||||
private void initInfo (String value, int M_Warehouse_ID, int M_PriceList_ID)
|
private void initInfo (int M_Warehouse_ID, int M_PriceList_ID)
|
||||||
{
|
{
|
||||||
// Pick init
|
// Pick init
|
||||||
fillPicks(M_PriceList_ID);
|
fillPicks(M_PriceList_ID);
|
||||||
int M_PriceList_Version_ID = findPLV (M_PriceList_ID);
|
int M_PriceList_Version_ID = findPLV (M_PriceList_ID);
|
||||||
// Set Value or Name
|
|
||||||
if (value.startsWith("@") && value.endsWith("@"))
|
|
||||||
fieldName.setText(value.substring(1,value.length()-1));
|
|
||||||
else
|
|
||||||
fieldValue.setText(value);
|
|
||||||
// Set Warehouse
|
// Set Warehouse
|
||||||
if (M_Warehouse_ID == 0)
|
if (M_Warehouse_ID == 0)
|
||||||
M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID");
|
M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID");
|
||||||
|
|
Loading…
Reference in New Issue