Olá colegas,
Eu tenho uma página com 2 forms, o Menu que é FORM_MENU e o conteúdo que é FORM_CONTENT, os dados são digitados no FORM_CONTENT, e ao clicar em Confirmar no FORM_MENU os dados devem ser enviados para o ManagedBean, mas hoje isso não funciona, eu tenho que ter um commandLink ou commandButton no FORM_CONTENT. Tem como fazer isso?
Agradeço desde já. Abraços.
Segue o código atual caso necessário:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<head>
<title>POS Browser - Transação de Adiantamento</title>
</head>
<body>
<f:view>
<ui:composition template="./template.xhtml">
<div class="dadospesquisa">
<ui:define name="left">
<h:form id="Form_Menu">
<rich:panel>
<f:facet name="header">
<h:outputText value="Menu de Opções"/>
</f:facet>
<div class="imagem">
<h:commandLink id="cmdlconfirm" action="#{AdiantamentoFace.newTransacaoAdiantamento}" title="Confirmar dados da viagem.">
<img src="img/confirm.png" width="64" height="64" border="0"/>
<br/>Confirmar
</h:commandLink>
</div>
<div class="imagem">
<h:commandLink action="#" title="Cancelar operação.">
<img src="img/cancel.png" width="64" height="64" border="0"/>
<br/>Cancelar
</h:commandLink>
</div>
</rich:panel>
</h:form>
</ui:define>
<ui:define name="content">
<h:form id="Form_Content">
<rich:panel>
<f:facet name="header">
<h:outputText value="Seleção do ETF"/>
</f:facet>
<table border="0" align="center">
<tbody>
<tr>
<td align="left">Código: </td>
<td align="left">Nome Fantasia: </td>
</tr>
<tr>
<td align="left">
<h:inputText id="Codigo" size="13" maxlength="15"
value="#{AdiantamentoFace.estabelecimento.cdEstabelecimento}"
required="true"
readonly="true">
</h:inputText>
</td>
<td align="left">
<h:inputText id="Fantasia" size="55" maxlength="50"
value="#{AdiantamentoFace.estabelecimento.nmFantasia}"
required="true"
readonly="true">
</h:inputText>
</td>
<td align="right">
<h:commandLink action="#{AdiantamentoFace.newConsultaAdiantamento}" title="Pesquisar Novo ETF."
rendered="#{AdiantamentoFace.usuario.idTipoUser == 0}">
<img src="img/find.png" width="32" height="32" border="0"/>
</h:commandLink>
</td>
</tr>
</tbody>
</table>
</rich:panel>
<br/>
<rich:panel>
<f:facet name="header">
<h:outputText value="Dados da Viagem"/>
</f:facet>
<table border="0" align="center">
<tbody>
<tr>
<td align="left">Número do Cartão:</td>
<td align="left">
<h:inputText id="Numero_Cartao" size="17" maxlength="19"
value=""
required="true"
onkeydown="keyenter(event);"
onkeypress="mascara(this,cartao)">
<f:validator validatorId="ValidatorAdiantamento"/>
</h:inputText>
</td>
<td width="10%" />
<td align="left">CVV:</td>
<td align="left">
<h:inputText id="Codigo_Seguranca" size="2" maxlength="3"
value=""
required="true"
onkeydown="keyenter(event);"
>
<f:validator validatorId="ValidatorAdiantamento"/>
</h:inputText>
</td>
</tr>
<tr>
<td align="left">Número da Viagem:</td>
<td align="left">
<h:inputText id="Numero_Viagem" size="11" maxlength="13"
value=""
required="true"
onkeydown="keyenter(event);"
onkeypress="mascara(this,viagem)">
<f:validator validatorId="ValidatorAdiantamento"/>
</h:inputText>
<h:commandLink id="cmdlconfirmTest" action="#{AdiantamentoFace.newTransacaoAdiantamento}" title="Confirmar dados da viagem.">
<br/>Confirmar
</h:commandLink>
</td>
</tr>
</tbody>
</table>
</rich:panel>
</h:form>
</ui:define>
</div>
</ui:composition>
</f:view>
</body>
</html>