Hi
Im sure this is a trivial but I cant find a sample or forum thread that discusses how to create a form that allows management of the association between a manytoone association. I am using smartgwtee pro 2.4 and the spring/hibernate/DMI and want a simple form to
For example (non relevant attributes ignored) the domain classes look like:
public class Person (
@ManyToOne(fetch=LAZY,optional=true)
@ForeignKey(name="fk_person_country")
public Country getCountryOfResidence() {
return countryOfResidence;
}
public void setCountryOfResidence(Country countryOfResidence) {
this.countryOfResidence = countryOfResidence;
}
)
Country (
)
I can happily list Person objects and show their country using the xpath value as per the spring sample. How should the form be constructed with a combobox to display a country for person. My approach at the moment is to create a DynamicForm with the datasource of Person and add a ComboBoxItem with a datasource of Country. This does not seem to work and the countryOfResidence form item shows as [object Object]
Any help much appreciated.
Many thanks
Anthony
Im sure this is a trivial but I cant find a sample or forum thread that discusses how to create a form that allows management of the association between a manytoone association. I am using smartgwtee pro 2.4 and the spring/hibernate/DMI and want a simple form to
For example (non relevant attributes ignored) the domain classes look like:
public class Person (
@ManyToOne(fetch=LAZY,optional=true)
@ForeignKey(name="fk_person_country")
public Country getCountryOfResidence() {
return countryOfResidence;
}
public void setCountryOfResidence(Country countryOfResidence) {
this.countryOfResidence = countryOfResidence;
}
)
Country (
)
I can happily list Person objects and show their country using the xpath value as per the spring sample. How should the form be constructed with a combobox to display a country for person. My approach at the moment is to create a DynamicForm with the datasource of Person and add a ComboBoxItem with a datasource of Country. This does not seem to work and the countryOfResidence form item shows as [object Object]
Any help much appreciated.
Many thanks
Anthony
Comment