Search code examples
grailsgrails-plugin

Is there a command to show all fields but selected with Grails Fields Plugin?


Right now, Grails generated the next code:

<f:all bean="forestHappyAnimals"/>

I want to hide/show some fields with Javascript doing something like:

<div id="message-1" onclick="document.getElementById('hideMeId').style.display='none'">Click to hide</div>
<div id="message-2" onclick="document.getElementById('hideMeId').style.display='inline'">Click to show</div>

<div id="hideMeId">
...
</div>

If I write the next code, the property name appear twice:

<f:all bean="forestHappyAnimals"/>

<div id="hideMeId">
    <f:field bean="forestHappyAnimals" property="name"/>
</div>

How could I avoid that field repeated? The only way is to write <f:field bean="... for all fields?


Solution

  • Try to use except attribute like describes in documentation

    except - A comma-separated list of properties that should be skipped (in addition to the defaults).