From 87c20114726e29ec515c320e3268d7bbd4413a38 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Wed, 16 Apr 2008 13:55:58 +0000 Subject: [PATCH] Action test link added. svn changeset:4187/svn branch:trunk --- .../com/itmill/toolkit/demo/PortletDemo.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/portlet-src/com/itmill/toolkit/demo/PortletDemo.java b/portlet-src/com/itmill/toolkit/demo/PortletDemo.java index 89eff77672..e4089612f3 100644 --- a/portlet-src/com/itmill/toolkit/demo/PortletDemo.java +++ b/portlet-src/com/itmill/toolkit/demo/PortletDemo.java @@ -36,6 +36,7 @@ public class PortletDemo extends Application { Label userInfo = new Label(); Link portletEdit = new Link(); Link portletMax = new Link(); + Link someAction = null; public void init() { main = new Window(); @@ -69,7 +70,7 @@ public class PortletDemo extends Application { public void handleActionRequest(ActionRequest request, ActionResponse response) { - getMainWindow().showNotification("Action received"); + main.addComponent(new Label("Action received")); } @@ -133,6 +134,19 @@ public class PortletDemo extends Application { portletMax.setEnabled(false); } + if (someAction == null) { + url = response.createActionURL(); + try { + someAction = new Link("An action", new ExternalResource(url + .toString())); + main.addComponent(someAction); + } catch (Exception e) { + // Oops + System.err.println("Could not create someAction: " + e); + } + + } + } } } -- 2.39.5