[ 1892439 ] Callout not invoke for changes to existing ASI

This commit is contained in:
Heng Sin Low 2008-02-13 06:18:04 +00:00
parent 1955c018cb
commit e9e5ee5504
2 changed files with 28 additions and 2 deletions

View File

@ -257,7 +257,7 @@ public class VEditorFactory
// PAttribute // PAttribute
else if (displayType == DisplayType.PAttribute) else if (displayType == DisplayType.PAttribute)
{ {
VPAttribute attrib = new VPAttribute (mandatory, readOnly, updateable, WindowNo, VPAttribute attrib = new VPAttribute (mTab, mandatory, readOnly, updateable, WindowNo,
(MPAttributeLookup)mField.getLookup()); (MPAttributeLookup)mField.getLookup());
attrib.setName(columnName); attrib.setName(columnName);
attrib.setField (mField); attrib.setField (mField);

View File

@ -42,7 +42,7 @@ public class VPAttribute extends JComponent
*/ */
public VPAttribute() public VPAttribute()
{ {
this (false, false, true, 0, null); this (null, false, false, true, 0, null);
} // VAssigment } // VAssigment
/** /**
@ -55,8 +55,24 @@ public class VPAttribute extends JComponent
*/ */
public VPAttribute (boolean mandatory, boolean isReadOnly, boolean isUpdateable, public VPAttribute (boolean mandatory, boolean isReadOnly, boolean isUpdateable,
int WindowNo, MPAttributeLookup lookup) int WindowNo, MPAttributeLookup lookup)
{
this(null, mandatory, isReadOnly, isUpdateable, WindowNo, lookup);
}
/**
* Create Product Attribute Set Instance Editor.
* @param gridTab
* @param mandatory mandatory
* @param isReadOnly read only
* @param isUpdateable updateable
* @param WindowNo WindowNo
* @param lookup Model Product Attribute
*/
public VPAttribute (GridTab gridTab, boolean mandatory, boolean isReadOnly, boolean isUpdateable,
int WindowNo, MPAttributeLookup lookup)
{ {
super.setName("M_AttributeSetInstance_ID"); super.setName("M_AttributeSetInstance_ID");
m_GridTab = gridTab; // added for processCallout
m_WindowNo = WindowNo; m_WindowNo = WindowNo;
m_mPAttribute = lookup; m_mPAttribute = lookup;
m_C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, "C_BPartner_ID"); m_C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), WindowNo, "C_BPartner_ID");
@ -115,6 +131,10 @@ public class VPAttribute extends JComponent
private boolean m_mandatory; private boolean m_mandatory;
private int m_WindowNo; private int m_WindowNo;
private int m_C_BPartner_ID; private int m_C_BPartner_ID;
/** The Grid Tab * */
private GridTab m_GridTab; // added for processCallout
/** The Grid Field * */
private GridField m_GridField; // added for processCallout
/** Calling Window Info */ /** Calling Window Info */
private int m_AD_Column_ID = 0; private int m_AD_Column_ID = 0;
@ -123,6 +143,7 @@ public class VPAttribute extends JComponent
/** Logger */ /** Logger */
private static CLogger log = CLogger.getCLogger(VPAttribute.class); private static CLogger log = CLogger.getCLogger(VPAttribute.class);
/** /**
* Dispose resources * Dispose resources
*/ */
@ -132,6 +153,8 @@ public class VPAttribute extends JComponent
m_button = null; m_button = null;
m_mPAttribute.dispose(); m_mPAttribute.dispose();
m_mPAttribute = null; m_mPAttribute = null;
m_GridField = null;
m_GridTab = null;
} // dispose } // dispose
/** /**
@ -258,6 +281,7 @@ public class VPAttribute extends JComponent
{ {
// To determine behavior // To determine behavior
m_AD_Column_ID = mField.getAD_Column_ID(); m_AD_Column_ID = mField.getAD_Column_ID();
m_GridField = mField;
} // setField } // setField
/** /**
@ -381,6 +405,8 @@ public class VPAttribute extends JComponent
{ {
log.log(Level.SEVERE, "", pve); log.log(Level.SEVERE, "", pve);
} }
if (M_AttributeSetInstance_ID == oldValue)
m_GridTab.processCallout(m_GridField); // fire value changed
} // change } // change
m_button.setEnabled(true); m_button.setEnabled(true);
requestFocus(); requestFocus();