SuperMoonster
Programmer
Hello everyone, I'd like your help to find an error. I have an action, a form bean, but it isn't being populated! Could you help my find out why? There goes my code:
struts-config:
In my action, I do:
In my jsp, I have:
I activate the action from the link.
In my action, when I try to get the values from the form, everything comes blank, like if I hadn't informed anything.
Anyone has a clue? thanks
struts-config:
Code:
<form-bean name="addDelUpdMPFichaTecnicaForm" type="auge.form.AddDelUpdMPFichaTecnicaForm"/>
<action
path="/AddMPFichaList"
type="auge.action.AddMPFichaListAction"
name="addDelUpdMPFichaTecnicaForm"
scope="session"
parameter="action"
validate="true"
input="/pages/fichaTecnica/fichaTecnica.jsp">
<forward name="success" path="/pages/fichaTecnica/fichaTecnica.jsp"/>
<forward name="error" path="/pages/erro.jsp"/>
</action>
In my action, I do:
Code:
mpFichaTecnica.setMateriaPrima(MateriaPrimaService.getInstance().getMateriaPrima(addMpFichaTecnicaForm.getMateriaPrima())); mpFichaTecnica.setQuantidade(addMpFichaTecnicaForm.getQuantidade()); mpFichaTecnica.setPrincipal(addMpFichaTecnicaForm.getPrincipal());
In my jsp, I have:
Code:
<html:form action="/AddMPFichaList" method="post" focus="materiaPrima">
<table border="0" align="center" width="100%">
<tr>
<td>Matéria Prima</td>
<td>Quantidade</td>
<td>Principal</td>
<td></td>
</tr>
<tr>
<td> <html:text property="materiaPrima" size="5" onchange="javascript:limpaMateria()"/>
<img src="/AugeProducao/config/lupa.gif" alt="Clique aqui para visualizar as opções" height="20" width="20" onclick="javascript:abreJanelaMateria()"></img>
<input type="text" name="nme_materia" size="55" readonly="true"></td>
<td> <html:text property="quantidade" size="5" /> </td>
<td> <html:text property="principal" size="5" /> </td>
<td> <html:link action="/AddMPFichaList.do">Adicionar</html:link></td>
</tr>
</table>
</html:form>
I activate the action from the link.
In my action, when I try to get the values from the form, everything comes blank, like if I hadn't informed anything.
Anyone has a clue? thanks