You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Erik de Hair <e....@pocos.nl> on 2015/04/13 09:48:49 UTC

updating object after edit

Hi,

I need to update some properties of an object after editing the same 
object (by using the Edit button). I tried this with updated() and 
updating() methods but like [1] says this doesn't work (at least not in 
this case). Is there any other way of doing this while using the Edit 
button or do I need to create an update action to do this. I believe the 
EventBus can only be used for actions?

Thanks,
Erik

[1] http://isis.apache.org/reference/Recognized-Methods-and-Prefixes.html

Re: updating object after edit

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Erik,

Sorry no-one's replied before now; still, better late than never...


On 13 April 2015 at 08:48, Erik de Hair <e....@pocos.nl> wrote:

> Hi,
>
> I need to update some properties of an object after editing the same
> object (by using the Edit button). I tried this with updated() and
> updating() methods but like [1] says this doesn't work (at least not in
> this case). Is there any other way of doing this while using the Edit
> button or do I need to create an update action to do this. I believe the
> EventBus can only be used for actions?
>
>
Actually, the EventBus supports property changes too.  So I think you can
do it that way.  Just be aware that you'll get an event for each property
that has changed.

See for example the todoapp, [1], [2]

Cheers
Dan

[1]
https://github.com/isisaddons/isis-app-todoapp/blob/391d00913196eaccbb3fb6ce91945cedef86fb58/dom/src/main/java/todoapp/dom/module/todoitem/ToDoItem.java#L194
[2]
https://github.com/isisaddons/isis-app-todoapp/blob/391d00913196eaccbb3fb6ce91945cedef86fb58/dom/src/main/java/todoapp/dom/app/demoeventsubscriber/DemoDomainEventSubscriptions.java#L192




> Thanks,
> Erik
>
> [1] http://isis.apache.org/reference/Recognized-Methods-and-Prefixes.html
>