Message Boards

« Back to 2.- Usage ( From Xml file to CRUD Portlet)

How can refresh multi level depended comboboxes

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
How can refresh multi level depended comboboxes
validate chain validation depends validation
Answer
5/16/12 6:43 AM
Hello all
I have 4 tables:
Countries: CountryId, CountryName
Satates: StateId, StateName, StateCountrId
Cities: CityId, CityName, CityCountryId, CityStateId
Customers: CustomerId, CustomerName, CustomerCountryId, CustomerStateId, CustomerCityId.

In the Customers portlet CustomerCountryId validates the CountryId, CustomerStateId validates the StateId and depends on the StateCountrId, CustomerCityId validates the CityId and depends on the StateId.

In that portlet, when I change the country, the States combo is filtered but Cities combo is not filtered depending on the refreshed state at this time. I must select an state to filter the Cities.

How can I filter the Cities by changing the country?

RE: How can refresh multi level depended comboboxes
customization chain validation depends validation
Answer
5/16/12 12:42 PM as a reply to Hamid Ehyaei.
Hello Hamid,

Sorry but validation is only fired when the "depending" field is changed, this is because its field Id is needed to get the related records. If you want that logic changed, you will have to touch the generated code, and make your own develpment.

If you find some general solution for this, please get back and share, we will try to insert it into the code.

Saludos, Jack.