isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: How to call a mixin action from view model?
Date Mon, 13 Nov 2017 04:19:39 GMT
Yes, that's the way to do it.

On Mon, 13 Nov 2017, 04:17 Paul Benedict Jabines, <jabinespbi@gmail.com>
wrote:

> Oh I think I know it. will use the FactoryService.mixin(Cutomer.class,
> customer).$$();
>
> On Mon, Nov 13, 2017 at 12:03 PM, Paul Benedict Jabines <
> jabinespbi@gmail.com> wrote:
>
> > If I have a View Model like this:
> >
> > @DomainObject(
> >         nature = Nature.VIEW_MODEL
> > )
> > public class View {
> >     public Customer customer;
> >
> >     public View(Customer customer) {
> >         this.customer = customer;
> >     }
> >
> >     public void delete() {
> >         customer.delete();
> >     }
> > }
> >
> > where customer.delete() is a mixin action. How to call it from the view
> > model?
> >
> > --
> > - Paul
> >
>
>
>
> --
> - Paul
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message