Results 1 to 3 of 3

Thread: Field visibility in different views

  1. #1
    Join Date
    Aug 2010
    Posts
    4

    Default Field visibility in different views

    Hi,

    Is there a way to annotate a field in an entity as not form backed ?
    I have a Person entity with a registration date. I want the date to be automatically entered (no need for a calendar on the create view). But I'd like the show view to show the registered date. I can of course comment things out in the views, but Roo seems to recreate them.

    Thanks !
    Phil

  2. #2

    Default

    You could set the render attribute to false of the generated create and update views.
    Code:
    <field:input field="fieldName" id="fieldName_Id" render="false" z="user-managed"/>
    To keep your old data track the value as a hidden input field or post-manipulate your entry.

  3. #3
    Join Date
    Aug 2010
    Posts
    4

    Default

    Thanks ! I used this technique along with @PreUpdate and @PrePersist annotations in the java code to get what I needed.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •