I'm new to JSP and Tiles, as well as Java. We are currently replatforming our site using these, but I am confused as to when something should be put into a view preparer vs coming from the controller.
For example, the current page I am working on will have a tile for pagination, including the content type (X of Y content-type). My original plan was to use a View Preparer to take the data being sent in by the controller (HashMap) and output a couple attributes for the pagination tile, but a co-worker told me this should be done in the controller instead.
If this is the case, what is the point of the View Preparer? I'm just slightly confused. I checked the Tiles docs and they are pretty basic/unusable.
Can someone give me a proper use case for a View Preparer?