IDEMPIERE-94 Error Select Country In VLocationDialog Relate to CComboBox
http://jira.idempiere.com/browse/IDEMPIERE-94
This commit is contained in:
parent
7792142bc3
commit
8e04547cb7
|
|
@ -42,7 +42,7 @@ import org.compiere.model.MCountry;
|
||||||
import org.compiere.model.MLocation;
|
import org.compiere.model.MLocation;
|
||||||
import org.compiere.model.MRegion;
|
import org.compiere.model.MRegion;
|
||||||
import org.compiere.swing.CButton;
|
import org.compiere.swing.CButton;
|
||||||
import org.compiere.swing.CComboBox;
|
import org.compiere.swing.CComboBoxEditable;
|
||||||
import org.compiere.swing.CDialog;
|
import org.compiere.swing.CDialog;
|
||||||
import org.compiere.swing.CLabel;
|
import org.compiere.swing.CLabel;
|
||||||
import org.compiere.swing.CPanel;
|
import org.compiere.swing.CPanel;
|
||||||
|
|
@ -113,11 +113,11 @@ public class VLocationDialog extends CDialog
|
||||||
Env.setContext(Env.getCtx(), m_WindowNo, Env.TAB_INFO, "C_Country_ID", null);
|
Env.setContext(Env.getCtx(), m_WindowNo, Env.TAB_INFO, "C_Country_ID", null);
|
||||||
|
|
||||||
// Current Country
|
// Current Country
|
||||||
fCountry = new CComboBox(MCountry.getCountries(Env.getCtx()));
|
fCountry = new CComboBoxEditable(MCountry.getCountries(Env.getCtx()));
|
||||||
fCountry.setSelectedItem(m_location.getCountry());
|
fCountry.setSelectedItem(m_location.getCountry());
|
||||||
m_origCountry_ID = m_location.getC_Country_ID();
|
m_origCountry_ID = m_location.getC_Country_ID();
|
||||||
// Current Region
|
// Current Region
|
||||||
fRegion = new CComboBox(MRegion.getRegions(Env.getCtx(), m_origCountry_ID));
|
fRegion = new CComboBoxEditable(MRegion.getRegions(Env.getCtx(), m_origCountry_ID));
|
||||||
if (m_location.getCountry().isHasRegion()) {
|
if (m_location.getCountry().isHasRegion()) {
|
||||||
if ( m_location.getCountry().get_Translation(MCountry.COLUMNNAME_RegionName) != null
|
if ( m_location.getCountry().get_Translation(MCountry.COLUMNNAME_RegionName) != null
|
||||||
&& m_location.getCountry().get_Translation(MCountry.COLUMNNAME_RegionName).trim().length() > 0)
|
&& m_location.getCountry().get_Translation(MCountry.COLUMNNAME_RegionName).trim().length() > 0)
|
||||||
|
|
@ -166,8 +166,8 @@ public class VLocationDialog extends CDialog
|
||||||
private CTextField fAddress4 = new CTextField(20); // length=60
|
private CTextField fAddress4 = new CTextField(20); // length=60
|
||||||
private CTextField fCity = new CTextField(20); // length=60
|
private CTextField fCity = new CTextField(20); // length=60
|
||||||
private CityAutoCompleter fCityAutoCompleter;
|
private CityAutoCompleter fCityAutoCompleter;
|
||||||
private CComboBox fCountry;
|
private CComboBoxEditable fCountry;
|
||||||
private CComboBox fRegion;
|
private CComboBoxEditable fRegion;
|
||||||
private CTextField fPostal = new CTextField(5); // length=10
|
private CTextField fPostal = new CTextField(5); // length=10
|
||||||
private CTextField fPostalAdd = new CTextField(5); // length=10
|
private CTextField fPostalAdd = new CTextField(5); // length=10
|
||||||
private CButton fOnline = new CButton();
|
private CButton fOnline = new CButton();
|
||||||
|
|
@ -676,7 +676,7 @@ public class VLocationDialog extends CDialog
|
||||||
// clears cache
|
// clears cache
|
||||||
Env.reset(false);
|
Env.reset(false);
|
||||||
//reload regions to combo box
|
//reload regions to combo box
|
||||||
fRegion = new CComboBox(MRegion.getRegions(Env.getCtx(), country.getC_Country_ID()));
|
fRegion = new CComboBoxEditable(MRegion.getRegions(Env.getCtx(), country.getC_Country_ID()));
|
||||||
// select region
|
// select region
|
||||||
fRegion.setSelectedItem(values);
|
fRegion.setSelectedItem(values);
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue