|
From: Chad B. <cwb...@us...> - 2008-03-28 20:46:31
|
User: cwbrandon
Date: 08/03/28 13:46:36
Modified: andromda-jsf2/src/main/resources/templates/jsf2/preferences/portlet
Preferences.java.vsl
andromda-jsf2/src/main/resources/templates/jsf2/configuration/portlet
portlet.xml.vsl
Log:
generate portlet prefs config
Revision Changes Path
1.3 +1 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/preferences/portlet/Preferences.java.vsl
Index: Preferences.java.vsl
===================================================================
RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/preferences/portlet/Preferences.java.vsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- Preferences.java.vsl 28 Mar 2008 20:30:59 -0000 1.2
+++ Preferences.java.vsl 28 Mar 2008 20:46:35 -0000 1.3
@@ -38,7 +38,7 @@
{
return ((javax.portlet.PortletRequest)javax.faces.context.FacesContext.getCurrentInstance().getExternalContext().getRequest()).getPreferences();
}
-#foreach ($attribute in $class.attributes)
+#foreach ($attribute in $class.getAttributes(true))
/**
$attribute.getDocumentation(" * ")
1.2 +14 -6 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.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- portlet.xml.vsl 21 Mar 2008 16:07:13 -0000 1.1
+++ portlet.xml.vsl 28 Mar 2008 20:46:35 -0000 1.2
@@ -2,6 +2,7 @@
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+#set ($useCase = $applicationUseCases.iterator().next())
<portlet>
<portlet-name>$jsfUtils.toWebResourceName($applicationName)</portlet-name>
<display-name>$applicationName</display-name>
@@ -16,7 +17,7 @@
</init-param>
<init-param>
<name>ViewPage</name>
- <value>${applicationUseCases.iterator().next().initialTargetPath}.xhtml</value>
+ <value>${$useCase.initialTargetPath}.xhtml</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
@@ -30,11 +31,18 @@
<short-title>$applicationName</short-title>
<keywords>$applicationName</keywords>
</portlet-info>
- <!--portlet-preferences>
+#if ($useCase.preferences)
+ <portlet-preferences>
+#foreach ($attribute in $useCase.preferences.getAttributes(true))
<preference>
- <name>editorHeight</name>
- <value>500</value>
+ <name>$attribute.name</name>
+#if ($attribute.defaultValue)
+ <value>$attribute.defaultValue</value>
+#end
+ <read-only>$attribute.readOnly</read-only>
</preference>
- </portlet-preferences-->
+#end
+ </portlet-preferences>
+#end
</portlet>
</portlet-app>
|