diff options
-rw-r--r-- | WebContent/WEB-INF/portlet.xml | 13 | ||||
-rw-r--r-- | build/buildhelpers/com/itmill/toolkit/buildhelpers/PortletConfigurationGenerator.java | 11 |
2 files changed, 18 insertions, 6 deletions
diff --git a/WebContent/WEB-INF/portlet.xml b/WebContent/WEB-INF/portlet.xml index 6ac4cddcdc..73de82d8f9 100644 --- a/WebContent/WEB-INF/portlet.xml +++ b/WebContent/WEB-INF/portlet.xml @@ -12,6 +12,7 @@ <value>PortletDemo</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -45,6 +46,7 @@ <value>SimpleReserver</value> </init-param> <init-param><name>style</name><value>style=height:400px</value></init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -78,6 +80,7 @@ <value>SelectDemo</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -111,6 +114,7 @@ <value>TableDemo</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -144,6 +148,7 @@ <value>FilterSelect</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -177,6 +182,7 @@ <value>FeatureBrowser</value> </init-param> <init-param><name>style</name><value>style=height:650px</value></init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -210,6 +216,7 @@ <value>ModalWindow</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -243,6 +250,7 @@ <value>Calc</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -276,6 +284,7 @@ <value>NotificationDemo</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -309,6 +318,7 @@ <value>chat</value> </init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -342,6 +352,7 @@ <value>BrowserDemo</value> </init-param> <init-param><name>style</name><value>style=height:650px</value></init-param> + <init-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></init-param> <supports> <mime-type>text/html</mime-type> <portlet-mode>view</portlet-mode> @@ -366,7 +377,7 @@ <role-name>user</role-name> </security-role-ref> </portlet> - <context-param><name>widgetset</name><value>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</value></context-param> + <container-runtime-option> <name>javax.portlet.escapeXml</name> <value>false</value> diff --git a/build/buildhelpers/com/itmill/toolkit/buildhelpers/PortletConfigurationGenerator.java b/build/buildhelpers/com/itmill/toolkit/buildhelpers/PortletConfigurationGenerator.java index 01a1c47798..80a6d73031 100644 --- a/build/buildhelpers/com/itmill/toolkit/buildhelpers/PortletConfigurationGenerator.java +++ b/build/buildhelpers/com/itmill/toolkit/buildhelpers/PortletConfigurationGenerator.java @@ -69,7 +69,7 @@ public class PortletConfigurationGenerator { + " <security-role-ref>\n"
+ " <role-name>user</role-name>\n"
+ " </security-role-ref>\n" + " </portlet>\n";
- private static final String PORTLET_XML_FOOT = " %CONTEXTPARAMS%\n"
+ private static final String PORTLET_XML_FOOT = "\n"
+ " <container-runtime-option>\n"
+ " <name>javax.portlet.escapeXml</name>\n"
+ " <value>false</value>\n"
@@ -120,8 +120,9 @@ public class PortletConfigurationGenerator { String widgetset = "";
if (args.length > 1) {
- widgetset = "<context-param><name>widgetset</name><value>"
- + args[1] + "</value></context-param>";
+ widgetset = "\n "
+ + "<init-param><name>widgetset</name><value>" + args[1]
+ + "</value></init-param>";
}
/*
@@ -220,6 +221,7 @@ public class PortletConfigurationGenerator { style = "<init-param><name>style</name><value>"
+ m2.group(1) + "</value></init-param>";
}
+ style += widgetset;
String name = m.group(1);
// remove leading- and trailing whitespace
@@ -264,8 +266,7 @@ public class PortletConfigurationGenerator { }
- pstring += PORTLET_XML_FOOT
- .replaceAll("%CONTEXTPARAMS%", widgetset);
+ pstring += PORTLET_XML_FOOT;
lpstring += LIFERAY_PORTLET_XML_FOOT;
ldstring += LIFERAY_DISPLAY_XML_FOOT;
|