At 04:20 AM 2/15/2004, you wrote:
You Said:
During a payment process one may want to collect various details about a user, likewise in other parts of a system you perhaps want to do the same albeit in a different order. Hiding form values from a previous view would lock you into always needing to having the first form precede the second.


First, this is not true. You are not locked into anything. All this means is that you have to think about and plan for the actual logic you are coding to in the view. Having hidden fields does not mean those fields have to be initialized or even to exist. Indeed, you can condition the presence of the hidden fields on the order of the conduct of the session. I like a view to dynamically reflect what the logic of presentation is. This is, e.g., the point of i18n. We can profitably keep the locale of the user in session because this value in fact is a session attribute.

Although scoping the form its self in the session may not be the best option surely storing the values collected in the session would be more desirable as your forms remain clean and not dependent on and preceding forms.

Second, this does not meet what I would call a "clean" design. What we respectively think is "clean" depends, I think, on other priorities we have. I like to use the ActionForm strictly in relation to a view. Forms should reflect the logic of the view in my opinion, rather than be a sort of replacement technique on a temporary basis for the database in the model. Whether I am right in being so dogmatic on this is another issue.








---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to