Created
June 28, 2013 07:34
-
-
Save uklance/5883104 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Property | |
private Country country; | |
@Property | |
private City city; | |
public Country[] getCountries() { | |
return new Country[] { ... }; | |
} | |
public List<City> getNonEmptyCities() { | |
if (country.getCities().isEmpty()) { | |
return Collections.singletonList(new City(null)); | |
} | |
return country.getCities(); | |
} | |
public List<Street> getNonEmptyStreets() { | |
if (city.getStreets().isEmpty()) { | |
return Collections.singletonList(new Street(null, 0) | |
} | |
return city.getStreets(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<t:grid source="countries" row="country" add="cities" t:mixins="stitch/GridCollapse" collapseColumn="cities"> | |
<p:citiesCell> | |
<t:grid source="nonEmptyCities" row="city" add="streets" t:mixins="stitch/GridCollapse,stitch/DisableSort" collapseColumn="streets"> | |
<p:streetsCell> | |
<t:grid source="nonEmptyStreets" t:mixins="stitch/DisableSort" /> | |
</p:streetsCell> | |
</t:grid> | |
</p:citiesCell> | |
</t:grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment