Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why isn't my bean being populated?

Status
Not open for further replies.

SuperMoonster

Programmer
Aug 11, 2005
59
BR
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:
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top