|
From: Chad B. <cwb...@us...> - 2008-04-11 22:59:16
|
User: cwbrandon
Date: 08/04/11 15:59:21
Modified: andromda-jsf2/src/main/resources/templates/jsf2/configuration
web.xml.vsl
andromda-jsf2/src/main/resources/templates/jsf2/configuration/portlet
portlet.xml.vsl
Log:
add support for all tomahawk components with portlets
Revision Changes Path
1.13 +32 -13 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/web.xml.vsl
Index: web.xml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/web.xml.vsl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -r1.12 -r1.13
--- web.xml.vsl 21 Mar 2008 16:07:13 -0000 1.12
+++ web.xml.vsl 11 Apr 2008 22:59:21 -0000 1.13
@@ -98,9 +98,24 @@
better choice than the standard JSF server-side state saving.
</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+#if ($standalone)
<param-value>$stateSavingMethod</param-value>
+#else
+ <param-value>server</param-value>
+#end
</context-param>
+#if ($portlet)
+ <context-param>
+ <description>
+ Set the custom AddResource class that allows the myfaces resources to be written into portlet pages without
+ requiring the head tag, etc.
+ </description>
+ <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
+ <param-value>org.andromda.cartridges.jsf2.portlet.myfaces.tomahawk.AddResource</param-value>
+ </context-param>
+
+#end
<context-param>
<description>
This parameter tells MyFaces if javascript code should be allowed in the
@@ -142,6 +157,7 @@
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>
+
<!-- context-param merge-point -->
<!-- filter merge-point -->
#if ($securityEnabled && !$roles.empty)
@@ -150,13 +166,6 @@
<filter-class>${managedBeansPackage}.UserRoleFilter</filter-class>
</filter>
#end
-#if ($standalone)
- <!-- Trinidad Filter -->
- <filter>
- <filter-name>Trinidad Filter</filter-name>
- <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
- </filter>
-
<!-- Extensions Filter -->
<filter>
<filter-name>MyFaces Extensions Filter</filter-name>
@@ -195,6 +204,14 @@
</init-param>
-->
</filter>
+
+#if ($standalone)
+ <!-- Trinidad Filter -->
+ <filter>
+ <filter-name>Trinidad Filter</filter-name>
+ <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
+ </filter>
+
#foreach ($useCase in $useCases)
#foreach ($view in $useCase.views)
#if ($view.populatorRequired)
@@ -212,19 +229,21 @@
<filter-class>$manageable.populatorType</filter-class>
</filter>
#end
-
- <!-- filter-mapping merge-point -->
+#end
<filter-mapping>
- <filter-name>Trinidad Filter</filter-name>
+ <filter-name>MyFaces Extensions Filter</filter-name>
<url-pattern>*.${facesServletExtension}</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFaces Extensions Filter</filter-name>
- <url-pattern>*.${facesServletExtension}</url-pattern>
+ <url-pattern>/faces/*</url-pattern>
</filter-mapping>
+
+#if ($standalone)
+ <!-- filter-mapping merge-point -->
<filter-mapping>
- <filter-name>MyFaces Extensions Filter</filter-name>
- <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
+ <filter-name>Trinidad Filter</filter-name>
+ <url-pattern>*.${facesServletExtension}</url-pattern>
</filter-mapping>
#if ($securityEnabled && !$roles.empty)
1.5 +9 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/portlet/portlet.xml.vsl
Index: portlet.xml.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/portlet/portlet.xml.vsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- portlet.xml.vsl 29 Mar 2008 00:05:32 -0000 1.4
+++ portlet.xml.vsl 11 Apr 2008 22:59:21 -0000 1.5
@@ -6,7 +6,15 @@
<portlet>
<portlet-name>$jsfUtils.toWebResourceName($useCase.name)</portlet-name>
<display-name>$useCase.name</display-name>
- <portlet-class>$portletClass</portlet-class>
+ <portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
+ <init-param>
+ <name>portlet-class</name>
+ <value>$portletClass</value>
+ </init-param>
+ <init-param>
+ <name>portlet-filters</name>
+ <value>org.andromda.cartridges.jsf2.portlet.myfaces.tomahawk.ExtensionsPortletFilter</value>
+ </init-param>
<init-param>
<name>EditPage</name>
<value>${useCase.portletEditPath}.xhtml</value>
|