I am trying to figure out how to get the correct output with the following
order: Address 1, Address 2, City, State. With the code below, I keep
getting State ComboBox at the top. What I am doing wrong?
public class AddressForm extends DynamicForm {
public AddressForm() {
DataSource dataSource = new DataSource();
DataSourceTextField address1 = new DataSourceTextField("address1");
address1.setTitle("Address 1");
DataSourceTextField address2 = new DataSourceTextField("address2");
address2.setTitle("Address 2");
DataSourceTextField city = new DataSourceTextField("city");
city.setTitle("City");
dataSource.setFields(address1, address2, city);
this.setDataSource(dataSource);
ComboBoxItem stateItem = new ComboBoxItem();
stateItem.setTitle("State");
stateItem.setValueMap("AK", "AL", "AR", "AS", "AZ", "CA", "CO",
"CT", "DC", "DE", "FL",
"FM", "GA", "GU", "HI", "IA", "ID", "IL", "IN", "KS", "KY",
"LA", "MA", "ME", "MD",
"MH", "MI", "MN", "MO", "MP", "MS", "MT", "NC", "ND", "NE",
"NH", "NJ", "NM", "NV", "NY", "OH",
"OK", "OR", "PA", "PR", "PW", "RI", "SC", "SD", "TN", "TX",
"UT", "VI", "VT",
"VA", "WA", "WI", "WV", "WY");
this.setFields(stateItem);
this.setUseAllDataSourceFields(true);
}
}
Please help!
Original issue reported on code.google.com by paresh.l...@gmail.com on 5 Feb 2010 at 3:14
Original issue reported on code.google.com by
paresh.l...@gmail.com
on 5 Feb 2010 at 3:14