Apache Isis, clone/double form

64 Views Asked by At

I'm working with simple web app. I have an entity 'Person' that has a reference to another person (its parent).

public class Person {
.....
    @javax.jdo.annotations.Column(allowsNull = "true",name = "parentId")
        @Property(editing = Editing.ENABLED)
        private Person parent;
...

Apache Isis render the property 'parent' as hyperlink but I have to show it into another tab with all details(the user can't edit parent). How can I do it?

Thanks in advice

1

There are 1 best solutions below

0
On

If you just need a read-only view of the parent's properties within your Person object you might consider 2 options:

  1. Add eg. a transient1 getParentDetails() method to your Person class, that returns a Markup 2 containing pre-formated Html to render a summary of the parent's properties that you want to present in this case.

  2. For each parent property you want to present, add to your Person class a transient1 getParentFirstName(), getParentLastName(), etc

1 mark a persistent domain-object's property transient by using the @javax.jdo.annotations.NotPersistent annotation
2 https://isis.apache.org/guides/rgcms/rgcms.html#_rgcms_classes_value-types_Markup