I think you asked a longer question of this on Stack Overflow, which I've
answered there [1]
To summarise the answer I gave there.... I think it should be possible to
get the effect you're after, eg to allow the
CustomerContactInformation#phone property to be maintained from the
Customer, I suggest a simple action on Customer, eg:
@MemberOrder(named="contact", sequence="1")
public Customer updateContact(String newPhone) {
this.contact.setPhone(newPhone);
return this;
}
The @MemberOrder#name annotation will result in this button's action being
rendered under the contact property.
HTH
Dan
[1] https://stackoverflow.com/a/45662839/56880
On Fri, 11 Aug 2017 at 03:39 赵 敏 <[email protected]> wrote:
> Hi support,
>
> I'm building project with Apache Isis,but I have some confusion.
>
> In DDD,I know there have two objects,entity & value object.
>
> When I plan a DomainObject,eg. Customer, a entity object. I think one
> Customer may be have many value objects,for example contact information or
> other value objects.
>
> So I plan a value object called CustomerContactInformation,may be have
> other value objects.
>
> For the database,a entity object and its value objects may be persist to
> diff tables.
>
> I think CustomerContactInformation just a value object,it can not have any
> actions and should be maintained by Customer.
>
> In fact,Customer-CustomerContactInfomation definitely is 1-1.
>
> Now,how should I display CustomerContactInformation in Customer's layout
> and be able to edit CustomerContactInformation?
>
> Any ideas?
>
> Ekko
>
>