If you use the submit button to submit the form, does it work
properly? The message (input not found) seems to indicate that some
validation is kicking in. Try adding an "input" result to your
mapping so you can see the validation error on your form.
Matt
On 2/3/07, mmaia <[EMAIL PROTECTED]> wrote:
Hi,
I need a ww:select elemento to submit a form usin webwork, follow what I
have done so far:
In jsp page I have:
<ww:form
name="pacoteForm"
action="pesquisaOrigemOuData"
method="post"
validate="false">
and the ww:select tag:
<ww:select list="#session['origensPacote']" name="pacote.origem"
onchange="enviaOrigem()" />
enviaOrigem javascript code:
function enviaOrigem()
{
document.pacoteForm.submit();
}
The action is mapped on xwork.xml:
<action name="pesquisaOrigemOuData" class="pacoteAction"
method="pesquisaOrigemOuData">
<result name="success">/paginaPesquisa.jsp</result>
<result name="error">/listaPacotesPromocionais.jsp</result>
</action>
then the PacoteAction method:
public String pesquisaOrigemOuData()
{
log.debug("executando PacoteAction.pesquisaOrigemOuData()");
String statusPesquisa = getRequest().getParameter("statusPesquisa");
if (id != null)
{
if (statusPesquisa.equalsIgnoreCase("pesquisaOrigem"))
{
return paginaPesquisa();
}
else
{
ArrayList listaDatas = (ArrayList)
pacoteManager.findDatasPacotePorOrigem(pacote.getNome(),
pacote.getOrigem());
getSession().setAttribute(Constants.DATAS_PACOTE, listaDatas);
}
}
else
{
return ERROR;
}
return SUCCESS;
}
I´ve rechecke all this many times, everything looks correct to me.
But when the combo is selected I got the following message on catalina
console:
[AgenciaTurismoBasico] WARN [http-8080-Processor22]
DefaultActionInvocation.exec
uteResult(313) | No result defined for action
br.com.maweb.agenciaturismobasico.
webapp.action.PacoteAction and result input
Thus the method pesquisaOrigemOuData() is never called.
The funny thing is that, if I take the following URL an place in browser:
http://localhost:8080/AgenciaTurismoBasico/pesquisaOrigemOuData.htm
I can see in catalina cosole the debug message of the methos executing:
[AgenciaTurismoBasico] DEBUG [http-8080-Processor22]
PacoteAction.pesquisaOrigem
OuData(158) | executando PacoteAction.pesquisaOrigemOuData()
So I know this is already correctly mapped. What is the problem with using
ww:select to submit a form????
Is this a webwork bug?
--
View this message in context:
http://www.nabble.com/How-to-make-ww%3Aselect-submit-a-form-correctly--tf3167588s2369.html#a8787023
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
http://raibledesigns.com