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 351771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:40:29+00:00 2026-05-12T11:40:29+00:00

I’m working on a Grails application. There is a domain class participant – within

  • 0

I’m working on a Grails application. There is a domain class “participant” – within the view there is a possibility to select some filters. Those filters get applied through the corresponding controller. Once the filter has been applied to the selection, the result gets posted.
Now the problem is, that I don’t know how to revert those filters or clear them. Obviously, a simple HTML reset button within the view won’t work as the filtered result are POSTed.

Could anyone tell me, how to clear the filters used?
I don’t want a hardcoded href which redirects the user to the normal “list” action.
Any idea(s)?

  • 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-12T11:40:30+00:00Added an answer on May 12, 2026 at 11:40 am

    There are many ways to do what (I think) you want to do. One idea is to create another action in the same controller as the filter action that returns the list you want. I could try to give you an example but from the code you posted it isn’t clear which view you’re coming from, which view should be shown after clearing the filter or where the hardcoded id (1) id coming from. Also, is it possible that the code you posted had been modified in an attempt to solve this? The getParticipants method doesn’t appear to be called at all.

    If you wanted to answer some of these questions: starting view, target view (after clearing filters), controller involved and where the id is coming from, I could try to give you a better answer.

    Thanks for the extra info. Here’s one possible solution. I didn’t try this so the syntax may not be exact but it’ll get you started:

    It looks like what you would get without the filters is all the participants for a Conference. If that’s correct then you can add an action like this to ParcipantController.groovy

    def clearFilter = {
        def conference = Conference.get(params.id)
        def participants = conference.participants
        render(view:'list', model:[participants: participants, 
         participantsTotal: participants.size(),
         startDate:conference.start, 
         endDate:conference.end,
         canWrite: accessRightsService.canWrite(request.beholder, conference)])
    }
    

    Then you can add a tag to your page instead of the hard-coded anchor tag like this:
    Clear Filter

    I hope that helps,
    Dave

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I know there's a lot of other questions out there that deal with this
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have a view passing on information from a database: def serve_article(request, id): served_article

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.