Hi,

I'm still trying to figure-out the best practices for use of Struts...

I do now understand about using an Action to initialize a Form bean before
it's displayed via another action...if data is being retrieved from a
backend or something...

But, does it break the MVC/Struts model to use the Form bean as the "source"
of <html:options> lists etc.?  This is data that is strictly for pick lists,
etc., and does come from the model, and is not input by the user themselves.

It seems very handy to me to put both the list data retrieved from the model
(during initialization) there, and have the users "responses" in the same
object.

Struts seems to approve of this approach, as the <html:options> tag is data
for display only, but takes its data from the Form bean.  But maybe this is
just a case of Struts making it possible, and not a "suggested" approach.

I realized I can put objects in the session/request, and have additional
tags in the .jsp that would pull them out, and (I think) still let me use
the <html:options> tag, but this just doesn't seem as nicely formalized as
using the Form bean itself...especially within the context of the
<html:form> tags.

Is this a case where maybe the Struts approach might include another bean
strictly for populating the view?  Or is that just creating more work for a
"feature" that's already possible, just not formalized?

Thanks for any input and clarification...

-Chris


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

Reply via email to