Announcement Announcement Module
Collapse
No announcement yet.
Field visibility in different views Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


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

      Comment

      Working...
      X