You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Marcus Biel <Ma...@bmw.de> on 2002/10/22 14:43:00 UTC

ActionForm vs. Value Bean

If you got Data records from a database -
have they got to be saved in an ActionForm, or in a value bean ???

I guess they have to be saved in a value bean,
because ActionForm just take request parameters.

If so, what about the action mapping ?
name="ValueBean" instead of name="ActionForm" ?

thanks in advance.


cya,

marcus

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ActionForm vs. Value Bean

Posted by Adam Sherman <ad...@teachandtravel.com>.
Marcus Biel wrote:
> If you got Data records from a database -
> have they got to be saved in an ActionForm, or in a value bean ???
> 
> I guess they have to be saved in a value bean,
> because ActionForm just take request parameters.
> 
> If so, what about the action mapping ?
> name="ValueBean" instead of name="ActionForm" ?

Well, deffinitly not in a Form bean.

The way I do it is to put the value bean in the request scope, and then 
use it from the view.

ie. request.setAttribute("nameConstant",valueBean);

Then the value bean is available to all the JSP tags.

Does this help?

A.


-- 
Adam Sherman
Software Developer
Teach and Travel Inc.
+1.613.241.3103



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>