Wendy Smoak wrote:

From: "Vinicius Caldeira Carvalho" <[EMAIL PROTECTED]>


Not possible.



Not likely. ;)



The form hold values that do not come from a database, I'm
not talking about an update where we assemble the form from a dto class.
This is an insert form, so no values filled, only this specific hidden
field and also it comes from an outside bean, not the one I'm trying to
persist.



In the Action, before the form is displayed, retrieve the value from this 'outside bean' and use that value to set the value of the form property. Then forward to the input form, and Struts will display the value.

If you are allowing direct access to the JSP, don't. If you are retrieving
the 'outside bean' in the JSP, do it in the Action.



Well, I tried this approach before, but it seems that struts re-creates the form when parsing the jsp.

I have the caller action having the name="myform"
inside it I have this code:
myform.setUserId(myBean.getId());
then I forward
on the jsp:
<html:form action="saveAction">

my saveAction configuration on struts config also have the myForm as the name attribute.

Do I need to set the form on the request?

Thanks


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



Reply via email to