Hi,
I have a JSP that displays a list of objects of supertype Building as a result of a general query. The list includes buildings of many concrete types (ie House, Apartment, Office, etc - at least 20 possible types). If I click on any of the items in the list, I should go to the specific detail page for the particular type of building. I imagine that the request sends the buildingId as a parameter, and the Controller queries the database to pull up the object by its id.
Two questions:
1. Since I already got the objects and their data to populate the list, is there a way to use the clicked object to populate the View without making another query in the Controller ?
2. Is there a reasonable way to know what kind of View to return without running endless instanceof's ?
Thanks in advance,
Jorge


Reply With Quote