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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:58:18+00:00 2026-06-08T12:58:18+00:00

I have a attribute called status in my domain which is String type can

  • 0

I have a attribute called status in my domain which is String type can have any one of two values Applied , NotApplied

I have two check boxes to input this value. in my edit page i want to display these two check box.

If the value of status is Applied then the corresponding checkbox must be checked.

my code

 <g:message code="publicRuleInstance.course.label" default="Applied" />
<g:checkBox name="status " value="${publicRuleInstance?.status }" />

<g:message code="publicRuleInstance.course.label" default="NotApplied" />
<g:checkBox name="status " value="${publicRuleInstance?.status }" />

but here both the checkboxes are checked.

there must be a way to check the value i.e if the status = Applied then that perticular checkbox must be cheched else it should be unchecked.

Is there any way to doing it?

  • 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-06-08T12:58:21+00:00Added an answer on June 8, 2026 at 12:58 pm

    Use the checked attribute to control the state of your checkBox as described in the docs.
    Here you could add any expression to determine the state of the g:checkBox:

    <g:message code="publicRuleInstance.course.label" default="Applied" />
    <g:checkBox name="status " value="Applied" checked="${publicRuleInstance?.status == 'Applied'}"/>
    
    <g:message code="publicRuleInstance.course.label" default="NotApplied" />
    <g:checkBox name="status " value="NotApplied" checked="${publicRuleInstance?.status == 'NotApplied'}"/>
    

    If you just want to allow one of the values – Applied or NotApplied a g:radioGroup would be the better choice. With a checkBox the user could choose both values Applied and NotApplied.

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

Sidebar

Related Questions

I have two tables Department Professor in which Department has an attribute called HeadID
I have two tables job which contains an attribute called employer_id_job that links it
Let's say I have an class called Star which has an attribute color .
I have an abstract entity called Block which contains two attributes: column and order
I have an attribute called phoneNo in my Core Data model, an integer16 ,
I want to filter based on an attribute called level. Where I have written
I have an attribute for my users called :last_request_at, :null => false I need
I have an attribute declared on property. How can I get the property name
I have an attribute which is annotated with @Id. The ID is going to
I currently have three methods which I want to collapse into one: def send_email(contact,email)

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.