You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/01/19 20:00:38 UTC
good practice in creating form beans
When creating form beans does it have to have only, which the user can enter
information to?
In my JSP, there are fields
order date: present order date input field (user can update the
order date here)
Like this the JSP has about 20 fields.
Does the form bean should contain only the input fields?
so, the present order in this case should it be kept in request?
Until now I was putting all the information needed by JSP in the form bean
itself.
After reading this
http://www.learntechnology.net/validate-manually.do
I am not sure if I was doing the right thing.
So, would like to know the better way of doing the same.
Thanks.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: good practice in creating form beans
Posted by Laurie Harper <la...@holoweb.net>.
fea jabi wrote:
> When creating form beans does it have to have only, which the user can
> enter information to?
>
> In my JSP, there are fields
>
> order date: present order date input field (user can update
> the order date here)
>
> Like this the JSP has about 20 fields.
>
> Does the form bean should contain only the input fields?
>
> so, the present order in this case should it be kept in request?
>
>
> Until now I was putting all the information needed by JSP in the form
> bean itself.
>
> After reading this
> http://www.learntechnology.net/validate-manually.do
>
> I am not sure if I was doing the right thing.
>
> So, would like to know the better way of doing the same.
It's a matter of choice whether you include read-only data in your form
bean. Either approach will work. Some prefer to reserve the form bean
for marshaling input data, others like to keep all data in one
'container' and use the form bean for both.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org