IDEMPIERE-94 Error Select Country In VLocationDialog Relate to CComboBox

http://jira.idempiere.com/browse/IDEMPIERE-94
This commit is contained in:
Carlos Ruiz 2011-11-10 15:46:40 -05:00
parent 7792142bc3
commit 8e04547cb7
1 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@ import org.compiere.model.MCountry;
import org.compiere.model.MLocation;
import org.compiere.model.MRegion;
import org.compiere.swing.CButton;
import org.compiere.swing.CComboBox;
import org.compiere.swing.CComboBoxEditable;
import org.compiere.swing.CDialog;
import org.compiere.swing.CLabel;
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);
// Current Country
fCountry = new CComboBox(MCountry.getCountries(Env.getCtx()));
fCountry = new CComboBoxEditable(MCountry.getCountries(Env.getCtx()));
fCountry.setSelectedItem(m_location.getCountry());
m_origCountry_ID = m_location.getC_Country_ID();
// 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().get_Translation(MCountry.COLUMNNAME_RegionName) != null
&& 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 fCity = new CTextField(20); // length=60
private CityAutoCompleter fCityAutoCompleter;
private CComboBox fCountry;
private CComboBox fRegion;
private CComboBoxEditable fCountry;
private CComboBoxEditable fRegion;
private CTextField fPostal = new CTextField(5); // length=10
private CTextField fPostalAdd = new CTextField(5); // length=10
private CButton fOnline = new CButton();
@ -676,7 +676,7 @@ public class VLocationDialog extends CDialog
// clears cache
Env.reset(false);
//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
fRegion.setSelectedItem(values);
} else