Hi All, I have to construct a simple viewer page of a model let us assume Person, where i present a set of criterias to the user to choose from(based on state of persisted models) for e.g i have a dropdown for departments showing all the distinct departments for which Person records are available and once departments are chosen , i wish to present users with the list of all distinct designations (like manager,supervisor ..etc.) available for that group , when all the criteria values are selected and show button pressed is when i actually want to show the data. I am using GWT so i have a mvc implemented at client side itself with a view class and backed by a model class. The model class in this case is a simple aggregate class of Person class , that should contain a collection of Person class. Let us assume that the Person class is heavy ( it contains a CLOB field ) so this aggregate model has to be loaded on stages like first i want to display all available criteria values to the user and finally based on his selection of the set of criterias that will act as key will i actually want to go to the server to fetch the data and finally display. My typical approach is that in my model there has to be collections to represent the individual criteria fields that are to be rendered to the user like department, designation and finally another collection for the fully initialized set of Person models, but problem with that is , is see that data (criteria data) is duplicated at multiple places i.e both inside Person class models and criteria collection field in the aggregate class . Is there a established best-practice/design pattern to solve such kind of problem ?? Or what will be a proper solution to this problem.
Thanks in anticipation.