my dog learned polymorphism
The moose likes Groovy and the fly likes Default a g:checkBox to checked? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Reply Bookmark "Default a g:checkBox to checked?" Watch "Default a g:checkBox to checked?" New topic
Author

Default a g:checkBox to checked?

Joe Nelson
Greenhorn

Joined: Dec 11, 2008
Posts: 3
OK, Ive been fighting this for a while and cannot figure it out. I'm new to Grails, so have mercy.

I have a need to set a checkbox as checked as the default. I've been able to get the checkbox to work with my query when I leave it as unchecked as default.

My checkbox definitions is:



I have tried setting the "checked" attribute and I've tried various permutations of setting the params.areDuplicatesExcluded in my controller. But so far, everything I have tried either has no effect at all, or sets the parameter to checked no matter how the box is set.

I know this should be easy, but I have hit a brick wall.

Any help would be appreciated. How do I default the checkbox to checked and still get it to work?


--<br /> <br />Joe nelson
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Default a g:checkBox to checked?
 
Similar Threads
CSS Positioning Issue
how to set a form value programatically on PIE
My Access Key Does Not Work
DIV causes extra line break if a background color style is added?
Need Help with Jquery Selector logic