IDEMPIERE-417 Update BPLocation.Name

This commit is contained in:
Carlos Ruiz 2012-09-12 11:04:59 -05:00
parent d20678cab8
commit de3f840d0a
4 changed files with 27 additions and 5 deletions

View File

@ -364,11 +364,21 @@ public class VLocation extends JComponent
return;
// Data Binding
try
{
int C_Location_ID = 0;
if (m_value != null)
C_Location_ID = m_value.getC_Location_ID();
Integer ii = new Integer(C_Location_ID);
if (C_Location_ID != 0)
fireVetoableChange(m_columnName, oldValue, ii);
setValue(ii);
}
catch (PropertyVetoException pve)
{
log.log(Level.SEVERE, "VLocation.actionPerformed", pve);
}
} // actionPerformed
/**

View File

@ -624,6 +624,8 @@ public class VLocationDialog extends CDialog
bpl.setName(bpl.getBPLocName(m_location));
if (bpl.save())
success = true;
} else {
success = true;
}
}
}

View File

@ -179,6 +179,14 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, Pr
if (m_value != null)
C_Location_ID = m_value.getC_Location_ID();
Integer ii = new Integer(C_Location_ID);
// force Change - user does not realize that embedded object is already saved.
ValueChangeEvent valuechange = new ValueChangeEvent(WLocationEditor.this,getColumnName(),null,null);
fireValueChange(valuechange); // resets m_mLocation
if (C_Location_ID != 0)
{
ValueChangeEvent vc = new ValueChangeEvent(WLocationEditor.this,getColumnName(),null,ii);
fireValueChange(vc);
}
setValue(ii);
}
});

View File

@ -676,6 +676,8 @@ public class WLocationDialog extends Window implements EventListener
bpl.setName(bpl.getBPLocName(m_location));
if (bpl.save())
success = true;
} else {
success = true;
}
}
}