From 83b61d2f9ff73d04f47aa3209846cbafed5c9581 Mon Sep 17 00:00:00 2001 From: RuedigerMoeller Date: Tue, 8 Aug 2017 12:55:17 +0200 Subject: [PATCH] . --- .../docsamples/jsinterop/javaserves/TestPojo.java | 13 +++++++++++++ .../src/main/javascript/TestActorClient.js | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/examples/docsamples/src/main/java/docsamples/jsinterop/javaserves/TestPojo.java b/examples/docsamples/src/main/java/docsamples/jsinterop/javaserves/TestPojo.java index 155aa0a03..e442b640e 100644 --- a/examples/docsamples/src/main/java/docsamples/jsinterop/javaserves/TestPojo.java +++ b/examples/docsamples/src/main/java/docsamples/jsinterop/javaserves/TestPojo.java @@ -9,6 +9,7 @@ public class TestPojo implements Serializable { Map aMap = new HashMap(); List strings = new ArrayList<>(); + String someString; public TestPojo() { aMap.put("A",1); @@ -17,4 +18,16 @@ public TestPojo() { strings.add("2"); strings.add("3");strings.add("4"); } + + public Map getMap() { + return aMap; + } + + public List getStrings() { + return strings; + } + + public String getSomeString() { + return someString; + } } \ No newline at end of file diff --git a/examples/docsamples/src/main/javascript/TestActorClient.js b/examples/docsamples/src/main/javascript/TestActorClient.js index 2c9eb5710..c743ae5c9 100644 --- a/examples/docsamples/src/main/javascript/TestActorClient.js +++ b/examples/docsamples/src/main/javascript/TestActorClient.js @@ -26,9 +26,11 @@ kclient.useProxies(true).connect("http://localhost:8888/test").then( (app,e) => "docsamples.jsinterop.javaserves.TestPojo", { aMap: coder.jmap({"A": 1, "B": 2}), - strings: coder.jcoll("list", ['1', '2', '3']) + strings: coder.jcoll("list", ['1', '2', '3']), + someString: 'Blabla' } ); + console.log('outgoing: ', JSON.stringify(pojo,2)); app.plainPojo( pojo ).then( (r, e) => { console.log("plainPojo returned ", r, e); });