multilevel reference selector for attributes in New edit page

I have created a simple domain model with associations as follows….. country-- (one to many)-->State (one to many)-->City (one to many)--->User. Now i have two issues 1- Datagrid source as xpath, and in search i am using reference selector drop downs for each of country, state and city …but the application is not showing value for these drop downs.  2- When I want to add a new user by using new edit page. first i want to select a country, on country selection the relevant states should be available under another drop down, after selecting the state i should be able to select a city related to that state. The New Edit page with is created with dataview under entity User...but for linking reference selectors to the  attributes only the first level of reference selector between user and  city is available. while the 2nd level reference selector  between city and state, and 3rd level reference selector between state and country are not appearing to link. is there any problem..Please provide some examples
1 answers

This is possible, however there are a few caveats, here’s what I suggest:

  1. Make sure you populated your lists of Countries, States and Cities. 
  2. Make sure you actively associate States to the country they belong and cities to the State they belong
  3. In your dropdowns you can restrict the state dropdown via XPath and only show the states associated to the selected country. 

You can approach 3. in multiple ways, if you’re strictly using XPath referencing your page object, you will need to commit the object when a dropdown is selected through on change events ( i.e. when the user selects the country ) or the XPath will not see changes to the current object since this executes at DB level.

Hope this helps.