From 722ccd2ef736ad18b3f11f18d776f9f9cc0fee9a Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Wed, 7 Jul 2010 12:58:45 +0000 Subject: #3988 add getPortletConfig() to PortletApplicationContext2, allows getting portlet init parameters etc. svn changeset:14142/svn branch:6.4 --- .../vaadin/terminal/gwt/server/AbstractApplicationPortlet.java | 1 + .../vaadin/terminal/gwt/server/PortletApplicationContext2.java | 10 ++++++++++ 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java index 9a868d5516..b3b261cb7c 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java @@ -352,6 +352,7 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet PortletApplicationContext2 applicationContext = PortletApplicationContext2 .getApplicationContext(request.getPortletSession()); applicationContext.setResponse(response); + applicationContext.setPortletConfig(getPortletConfig()); PortletCommunicationManager applicationManager = applicationContext .getApplicationManager(application); diff --git a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java index ac3ec8f866..1ff07479fd 100644 --- a/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java +++ b/src/com/vaadin/terminal/gwt/server/PortletApplicationContext2.java @@ -16,6 +16,7 @@ import javax.portlet.ActionResponse; import javax.portlet.EventRequest; import javax.portlet.EventResponse; import javax.portlet.MimeResponse; +import javax.portlet.PortletConfig; import javax.portlet.PortletMode; import javax.portlet.PortletModeException; import javax.portlet.PortletResponse; @@ -49,6 +50,7 @@ public class PortletApplicationContext2 extends AbstractWebApplicationContext { protected Map> portletListeners = new HashMap>(); protected transient PortletSession session; + protected transient PortletConfig portletConfig; protected HashMap portletWindowIdToApplicationMap = new HashMap(); @@ -126,6 +128,14 @@ public class PortletApplicationContext2 extends AbstractWebApplicationContext { return session; } + public PortletConfig getPortletConfig() { + return portletConfig; + } + + public void setPortletConfig(PortletConfig config) { + portletConfig = config; + } + public void addPortletListener(Application app, PortletListener listener) { Set l = portletListeners.get(app); if (l == null) { -- cgit v1.2.3