Bom pessoal! eu tenho um tela de consulta onde eu posso fazer consulta por vários campos, um dos campos é um link que abre um popup, dentro do popup faço um consulta, seleciono o item da lista marcando um checkbox e quando eu marco esse checkbox eu preencho meu formulário e fecha o popup. [size=18]Lembrando que meu link de abrir o popup já está funcionando perfeitamente, minha consulta no popup tb o que está me tirando do sério é trazer esses valores para meu form :/[/size]
Segue meu código abaixo. Agradeço ajuda de todos!
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="displaytag" prefix="display"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="migalha" content="Consultar Fornecedor"/>
<script language="JavaScript" type="text/JavaScript">
</script>
</head>
<body>
<div id="form_liberar_processo">
<s:form action="ConsultarFornecedor/Consulta" method="post">
<table cellpadding="0" width="540" class="linha" cellspacing="0">
<tr>
<td width="540" colspan="2" bgcolor="#27316E" style="color: #fff;">
<p><strong>Consulta de Fornecedores</strong></p>
</td>
</tr>
<tr>
<td height="30" bgcolor="">
<p>
<strong>CPF/CNPJ : </strong>
<s:textfield cssClass="txt_campo" name="cnpjFornecedor" />
</p>
</td>
<td height="30" bgcolor="">
<p>
<strong>Nome : </strong>
<s:textfield cssClass="txt_campo" name="nomeFornecedor"/>
<s:submit value="Consultar" action="ConsultarFornecedor/Consulta" required="true" onclick="acao.value='consultarFornecedor'; this.form.target=''; this.form.submit();"/>
</p>
</td>
</tr>
</table>
<div id="Layer1" style="position: absolute; width: 540; height: 200; z-index: 1; overflow: scroll; visibility: visible;">
<display:table name="sessionScope.fornecedores" id="fornecedor" requestURI="carregar.do" pagesize="20">
<display:column property="codiForn" title="Código"
colocar meu checkbox
</display:column>
<display:column property="codiForn" title="Código"/>
<display:column property="cnpjCpf" title="CNPJ/CPF" sortable="true" escapeXml="true" />
<display:column property="nomeForn" title="Nome" sortable="true" escapeXml="true"/>
<!-- Colocar um Radio Button Struts -->
<!-- input type="radio" name="todos" value="1"/ -->
</display:table>
</div>
<br />
<table cellpadding="0" border="0" width="960" height="90" class="linha_sem" cellspacing="0">
<tr>
<td><s:submit value="OK" action="" onclick="acao.value='selecionarFornecedor';this.form.action=this.form.urlOrigem.value; this.form.target='libera_processos'; this.form.submit();window.close()"/></td>
</tr>
</table>
</s:form>
</div>
</body>
</html>