Hi,
By now I have used smartgwt with custom server solution using JSON in two small apps.
But now I'm evaluating to change to SmartGWTPro and I started to do some testing.
My first problem is navigating JPA relations:
-1-
It's posible to navigate them transparently?
It's mandatory to modify JPA models to have a field for the foreign key?
-2-
I modified JPA sample to has only a single grid for cities and be able to edit cityName and cityCountry with a SelectItem. What I've done is:
city_DataSource:
- Change canEdit to true for countryId
- Add:
And in client use that ListGrid:
But that doesn't work, because when I update I get an error complaining about countryName.
I'm doing my grid correctly?
A lot of thanks in advance,
By now I have used smartgwt with custom server solution using JSON in two small apps.
But now I'm evaluating to change to SmartGWTPro and I started to do some testing.
My first problem is navigating JPA relations:
-1-
It's posible to navigate them transparently?
It's mandatory to modify JPA models to have a field for the foreign key?
-2-
I modified JPA sample to has only a single grid for cities and be able to edit cityName and cityCountry with a SelectItem. What I've done is:
city_DataSource:
- Change canEdit to true for countryId
- Add:
Code:
<field name="countryName" type="string" title="Country" hidden="true" valueXPath="country/countryName" />
Code:
ListGridField country=new ListGridField("countryId","Country"); country.setEditorType(new SelectItem()); country.setDisplayField("countryName"); grid.setFields(new ListGridField("cityName","Name"),country);
I'm doing my grid correctly?
A lot of thanks in advance,
Comment