Ajax com error 404
21/09/2009 00:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 /WEB-INF/grails-app/views/vendor/search.jsp</title>
</head>
<body><h2>HTTP ERROR: 404</h2><pre>/WEB-INF/grails-app/views/vendor/search.jsp</pre>
<p>RequestURI=/cvhweb/WEB-INF/grails-app/views/vendor/search.jsp</p><p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>
class VendorController {
def index = {
render (template: "search")
}
def search = {
def vendorList: Vendor.list(params)
return [vendor:vendorList])
}
}
<%@ page contentType="text/html;charset=UTF-8" %>
<meta name="layout" content="main" />
<div class="form">
<g:formRemote name="frmSearchVendor"
url="[controller:'vendor', action:'search']">
<label for="txtLike">Pesquisa:</label>
<input type="text" name="vendorSiteCode" id="vendorSiteCode"/>
<input type="submit" value="Buscar" id="btnBuscar">
<!-- Tabela de resultado -->
<table id="tblResult" style="width:300px;">
<thead>
<tr>
<td></td>
<td>Código</td>
<td>Nome</td>
</tr>
</thead>
<tbody>
<g:each var="v" in="${vendorList?}">
<tr>
<td></td>
<td>${v.vendorSiteCode}</td>
<td>${v.vendorName}</td>
</tr>
</g:each>
</tbody>
</table>
</g:formRemote>
</div>
def search = {
def vendorList: Vendor.list(params)
render(template:'search', model:[vendor:vendorList])
}
<div id="loginForm">
<g:if test="${session?.user}">
<g:render template="/user/welcomeMessage"></g:render>
</g:if>
<g:else>
<g:render template="/user/loginForm"></g:render>
</g:else>
</div>
<g:formRemote update="divQuente" name="formularioQuente" url="[action:'executar', controller:'controladorQuente']">
bla bla bla
</g:formRemote>
<div id="divQuente">
Ouvi dizer que vou ser atualizada pelo ajax.
</div>
Para se registrar, clique aqui.