Wendy Smoak wrote:

From: "Jim Barrows" <[EMAIL PROTECTED]>


<html:form property="userId" value='<%=user.getId()%>'/>
You have 3 more choices:
1) The struts bean taglib
2) JSP bean tags
3) JSTL bean tags.
<html:blah property="userId" value="${user.id"/>



But... this prevents the framework from re-displaying the user's input if the form fails validation. (The user could have modified the value that was originally displayed, and that change will be lost.)



From: "Vinicius Caldeira Carvalho" <[EMAIL PROTECTED]>
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:



Can you post the actual code? I wonder if you are operating on the 'form' object that was passed into the Action.execute() method, or not?

Also post the relevant parts of struts-config.xml (for the 'caller action'
you mentioned, and saveAction.)



The caller :
<action path="/reservaProspeccao/solicitarReservaProspeccao"
type="com.squadra.portalvendas.apresentacao.reservaprospeccao.action.SolicitarReservaProspeccaoAction"
name="cadastrarReservaProspeccaoForm">
<forward path="cadastrar.solicitarReservaProspeccao" name="sucesso"/>
</action>
The save action
<action path="/reservaProspeccao/salvarReservaProspeccao"
type="com.squadra.portalvendas.apresentacao.reservaprospeccao.action.SalvarReservaProspeccaoAction"
input="cadastrar.solicitarReservaProspeccao"
name="cadastrarReservaProspeccaoForm">
<forward path="/SucessoGeral.jsp" name="sucesso"/>
</action>


<code>
Proponente proponente = delegate.findProponente(id);
CadastrarReservaProspeccaoForm reservaForm = (CadastrarReservaProspeccaoForm)form;
reservaForm.setIdProponente(proponente.getId());
</code>


As you can see I'm using the form object that is passed to the action via action servlet. After using I dont need to save it to the request do I?

Thanks for your time and patience


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



Reply via email to