dcsimg
Why isn't my bean being populated?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, September 23, 2005 01:15 PM

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: path="/AddMPFichaList" type="auge.action.AddMPFichaListAction" name="addDelUpdMPFichaTecnicaForm" scope="session" parameter="action" validate="true" input="/pages/fichaTecnica/fichaTecnica.jsp"> In my action, I do: mpFichaTecnica.setMateriaPrima(MateriaPrimaService.getInstance().getMateriaPrima(addMpFichaTecnicaForm.getMateriaPrima()));    More>>

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:








path="/AddMPFichaList"
type="auge.action.AddMPFichaListAction"
name="addDelUpdMPFichaTecnicaForm"
scope="session"
parameter="action"
validate="true"
input="/pages/fichaTecnica/fichaTecnica.jsp">








In my action, I do:


mpFichaTecnica.setMateriaPrima(MateriaPrimaService.getInstance().getMateriaPrima(addMpFichaTecnicaForm.getMateriaPrima()));
mpFichaTecnica.setQuantidade(addMpFichaTecnicaForm.getQuantidade());
mpFichaTecnica.setPrincipal(addMpFichaTecnicaForm.getPrincipal());



In my jsp, I have:































Matéria Prima Quantidade Principal


Clique aqui para visualizar as opções


Adicionar








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    <<Less

Re: Why isn't my bean being populated?

Posted By:   alan_do  
Posted On:   Friday, September 23, 2005 11:13 PM

forms cannot be submitted via links w/o using javascript to call form.submit() onclick of the link. try that or try using html:form together html:submit instead.
About | Sitemap | Contact