Hi, A newbie question on struts. The way a view is built using struts is as follows (I think!). After the action class processes the input and makes business logic method invocations on the model layer (say session beans or business delegates), it needs to fetch the data required for the next view and populate some value objects . The view then accesses these objects (thru html:text, bean:write tags etc) to create the html output.
The problems I see with this is that the action class becomes extremely cluttered with the logic for fetching and populating the value objects, especially when there are multiple 'commands' the action class is designed to process ('sort', 'edit', 'save' etc) and there are several forwards out of the action with different views. (I can see that the question of where to take the data from becomes a problem when there are validation errors. In this case, the view has to take the data from the ActionForm and not from the model. But this is a lesser problem than the above mentioned problem of action class complexity, I think.) Isn't it better that the view populates itself from the model via system state beans.These can be simple beans which query the model layer for the values required by the view. This way, the action class need not be modified, if the view is changed to add a new display-only field, for example. Struts does not seem to support this since we cannot take the data from one bean (system state beans) and submit via another (ActionForm bean). Cheers, Krishna -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>