Hi Leandro,

As I'm sure you've figured out, the idea of the MementoService is to be
able to convert arbitrary values to and from a base 64 encoded string, such
that this can be used for the view model memento.

This unit test [1] shows the datatypes that are supported; all the usual
scalars and also Bookmarks.  Bookmarks are useful because (by way of the
related BookmarkService) they capture a reference to any arbitrary domain
object.

It's quite common for view models to have a "backing" persistent entity, so
in such cases you can use the BookmarkService to convert that entity into a
bookmark, then the MementoService to convert it into a string.

Anyway, hope that helps.  Let us know if you get stuck.

Cheers
Dan


[1]
https://github.com/apache/isis/blob/0af3219129076161143bd388e3fc3ec039cbed79/core/runtime/src/test/java/org/apache/isis/core/runtime/services/memento/MementoServiceDefaultTest.java#L48

On 23 September 2014 21:42, Leandro Torroija <leand...@hotmail.com> wrote:

> Hi everybody!
>
> I'm using the viewModels to represent non persistent data via
> WicketViewer. How can I implement the MementoService to make the use of the
> viewModels easier?
>
>
> Thanks!
>
> Leandro
>

Reply via email to