You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/03/05 15:31:35 UTC
[isis] branch master updated: ISIS-2553: Demo: fix for
InteractionDtoVm title
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 307de85 ISIS-2553: Demo: fix for InteractionDtoVm title
307de85 is described below
commit 307de85f6afb17b49c16e6a6c39e40bf98a602a6
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Mar 5 16:31:21 2021 +0100
ISIS-2553: Demo: fix for InteractionDtoVm title
---
.../java/demoapp/dom/domain/_interactions/InteractionDtoVm.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
index 1d968b4..9a225d7 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
@@ -19,6 +19,7 @@
package demoapp.dom.domain._interactions;
import java.text.SimpleDateFormat;
+import java.util.Date;
import org.apache.isis.applib.ViewModel;
import org.apache.isis.applib.annotation.DomainObject;
@@ -53,10 +54,12 @@ public class InteractionDtoVm implements ViewModel {
// nb: not thread-safe
// formats defined in https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
val format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
-
+ val exec = getInteractionDto().getExecution();
+ val instant = exec.getMetrics().getTimings().getStartedAt().toGregorianCalendar().toInstant();
+
val buf = new TitleBuffer();
- buf.append(format.format(getInteractionDto().getExecution().getMetrics().getTimings().getStartedAt().toString()));
- buf.append(" ").append(getInteractionDto().getExecution().getLogicalMemberIdentifier());
+ buf.append(format.format(Date.from(instant)));
+ buf.append(" ").append(exec.getLogicalMemberIdentifier());
return buf.toString();
}