Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7507935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:35:07+00:00 2026-05-29T22:35:07+00:00

So I am attempting to create a search field that will filter contacts on

  • 0

So I am attempting to create a search field that will filter contacts on the fly. So I have the main results being displayed in a template (Contact/list.gsp):

<%@ page import="contactmanager.Contact" %>
<!doctype html>
<html>
<head>
    <meta name="layout" content="main">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <g:set var="entityName" value="${message(code: 'contact.label', default: 'Contact')}" />
    <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
    <div id="list-contact" class="mainContent-contact" role="main">
        <h1><g:message code="default.list.label" args="[entityName]" /></h1>

        <g:if test="${flash.message}">
            <div class="message" role="status">${flash.message}</div>
        </g:if>

        <div id="searchBox">
            Instant Search: <g:remoteField name="q" update="searchResults" paramName="q" url="[controller:'contact', action:'search']"/>
        </div>

        <g:render template="searchResults"/>

        <div class="pagination">
            <g:paginate total="${contactInstanceTotal}" />
        </div>

    </div>
</body>

Here is my template (_searchResults.gsp):

<%@ page import="contactmanager.Contact" %>


        <div id = "searchResultsDiv">
                <table>
                    <thead>
                        <tr>
                            <g:sortableColumn property="firstName" title="${message(code: 'contact.firstName.label', default: 'First Name')}" />
                            <g:sortableColumn property="lastName" title="${message(code: 'contact.lastName.label', default: 'Last Name')}" />
                            <g:sortableColumn property="phone" title="${message(code: 'contact.phone.label', default: 'Phone')}" />
                            <g:sortableColumn property="email" title="${message(code: 'contact.email.label', default: 'Email')}" />
                            <g:sortableColumn property="title" title="${message(code: 'contact.title.label', default: 'Title')}" />
                            <g:sortableColumn property="jobFunc" title="${message(code: 'contact.jobFunc.label', default: 'Job Func')}" />
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${contactInstanceList}" status="i" var="contactInstance">
                            <g:if test="${contactInstance.isActive}">
                                <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

                                <td><g:link action="show" id="${contactInstance.id}">${fieldValue(bean: contactInstance, field: "firstName")}</g:link></td>
                                <td>${fieldValue(bean: contactInstance, field: "lastName")}</td>
                                <td>${fieldValue(bean: contactInstance, field: "phone")}</td>
                                <td>${fieldValue(bean: contactInstance, field: "email")}</td>
                                <td>${fieldValue(bean: contactInstance, field: "title")}</td>
                                <td>${fieldValue(bean: contactInstance, field: "jobFunc")}</td>

                                </tr>
                            </g:if>
                    </g:each>
                    </tbody>
                </table>
        </div>

So currently, when I enter my text, nothing is happening. I added a printout in my search method and that’s not being called at all. It’s almost as if my remoteField is stagnant and is not active.

Am I missing a pre-requisite to this tag? I looked at the official API online, but didn’t see anything at all indicating such. Is there something new to 2.0.0?

I am using the searchable plugin to pull results in the Controller, just FYI.

Thank you all for the help!

Update: So I added the javascript library call explicitly in my main.gsp and I seem to be getting some response back from the server, which is great news (missingPropertyException):

I had to add the plugin definition to the library call of jQuery (library = jquery and plugin= query)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T22:35:09+00:00Added an answer on May 29, 2026 at 10:35 pm

    First, thank you to those with the advice. I was able to figure out Firebug was a useful tool and that output pointed me to my library calls.

    So I am now seeing action from my server using the correct jQuery library call. My last problem was that I was referencing the template name in the update of the remoteField, not the name of the main div within the template.

    Once I fixed those, I am working. Thanks for all advice!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to create a contacts application that has two main entities - person
I am attempting to create a web page that will allow a user to
I'm attempting to create an xquery expression that will return selected nodes but will
I am attempting to create a simple program that will keep a text log
I'm attempting to create a custom calendar control that inherits from ASP.Net's built in
I am attempting to create a search function for user profiles on my site.
Attempting to create a filter select to find schedules with coursedates within a given
I am attempting to create a text-based adventure game for class, but I have
I'm attempting to create a column in css that is 100% height of the
I'm attempting to create a simple example that would just alert the first 5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.