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> |
From: Chad B. <cwb...@us...> - 2008-03-29 00:05:26
|
User: cwbrandon Date: 08/03/28 17:05:32 Modified: andromda-jsf2/src/main/resources/META-INF/andromda cartridge.xml andromda-jsf2/src/main/java/org/andromda/cartridges/jsf2/metafacades JSFUseCaseLogicImpl.java andromda-jsf2/src/main/resources/templates/jsf2/views/portlet edit.xhtml.vsl andromda-jsf2/src/main/uml JSFMetafacadeModel.xml.zip andromda-jsf2/src/main/resources/templates/jsf2/configuration faces-config.xml.vsl andromda-jsf2/src/main/resources/templates/jsf2/controllers Controller.java.vsl andromda-jsf2/src/main/resources/templates/jsf2/configuration/portlet portlet.xml.vsl Log: put portlet mode help/view/edit into the metafacades model and use those attributes Revision Changes Path 1.19 +2 -2 cartridges/andromda-jsf2/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -r1.18 -r1.19 --- cartridge.xml 28 Mar 2008 21:28:40 -0000 1.18 +++ cartridge.xml 29 Mar 2008 00:05:31 -0000 1.19 @@ -1094,7 +1094,7 @@ <template path="templates/jsf2/views/portlet/help.xhtml.vsl" - outputPattern="${useCase.pathRoot}/${jsfUtils.toWebResourceName($useCase.name)}-portlet-help.xhtml" + outputPattern="${useCase.portletHelpPath}.xhtml" outlet="views" overwrite="true" outputCondition="portlet"> @@ -1107,7 +1107,7 @@ <template path="templates/jsf2/views/portlet/edit.xhtml.vsl" - outputPattern="${useCase.pathRoot}/${jsfUtils.toWebResourceName($useCase.name)}-portlet-edit.xhtml" + outputPattern="${useCase.portletEditPath}.xhtml" outlet="views" overwrite="true" outputCondition="portlet"> 1.7 +41 -0 cartridges/andromda-jsf2/src/main/java/org/andromda/cartridges/jsf2/metafacades/JSFUseCaseLogicImpl.java Index: JSFUseCaseLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/java/org/andromda/cartridges/jsf2/metafacades/JSFUseCaseLogicImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- JSFUseCaseLogicImpl.java 28 Mar 2008 21:49:53 -0000 1.6 +++ JSFUseCaseLogicImpl.java 29 Mar 2008 00:05:32 -0000 1.7 @@ -823,4 +823,45 @@ } return preferences; } + + @Override + protected String handleGetPortletEditForwardName() + { + return this.getWebResourceName() + "-portlet-edit"; + } + + @Override + protected String handleGetPortletEditPath() + { + return this.getPathRoot() + "/" + this.getPortletEditForwardName(); + } + + @Override + protected String handleGetPortletHelpForwardName() + { + return this.getWebResourceName() + "-portlet-help"; + } + + @Override + protected String handleGetPortletHelpPath() + { + return this.getPathRoot() + "/" + this.getPortletHelpForwardName(); + } + + @Override + protected String handleGetPortletViewForwardName() + { + return this.getWebResourceName() + "-portlet-view"; + } + + private String getWebResourceName() + { + return JSFUtils.toWebResourceName(this.getName()); + } + + @Override + protected String handleGetPortletViewPath() + { + return this.getInitialTargetPath(); + } } 1.5 +1 -1 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/portlet/edit.xhtml.vsl Index: edit.xhtml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/views/portlet/edit.xhtml.vsl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- edit.xhtml.vsl 28 Mar 2008 23:25:44 -0000 1.4 +++ edit.xhtml.vsl 29 Mar 2008 00:05:32 -0000 1.5 @@ -11,7 +11,7 @@ <h:inputText value="#{${useCase.controller.beanName}.preferences.${attribute.name}}"/> #end </h:panelGrid> - <h:commandButton value="#{messages['action.save']}" action="#{${useCase.controller.beanName}.setPortletModeView}"/> + <h:commandButton value="#{messages['action.save']}" action="#{${useCase.controller.beanName}.portletModeView}"/> </h:form> </ui:define> </ui:composition> 1.13 +225 -204 cartridges/andromda-jsf2/src/main/uml/JSFMetafacadeModel.xml.zip <<Binary file>> 1.16 +23 -0 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/faces-config.xml.vsl Index: faces-config.xml.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/configuration/faces-config.xml.vsl,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -r1.15 -r1.16 --- faces-config.xml.vsl 28 Mar 2008 21:30:29 -0000 1.15 +++ faces-config.xml.vsl 29 Mar 2008 00:05:32 -0000 1.16 @@ -258,6 +258,29 @@ <redirect/> </navigation-case> </navigation-rule> +#if ($portlet) + <navigation-rule> + <navigation-case> + <from-outcome>$useCase.portletViewForwardName</from-outcome> + <to-view-id>${useCase.portletViewPath}.${jsfUtils.viewExtension}</to-view-id> + <redirect/> + </navigation-case> + </navigation-rule> + <navigation-rule> + <navigation-case> + <from-outcome>$useCase.portletEditForwardName</from-outcome> + <to-view-id>${useCase.portletEditPath}.${jsfUtils.viewExtension}</to-view-id> + <redirect/> + </navigation-case> + </navigation-rule> + <navigation-rule> + <navigation-case> + <from-outcome>$useCase.portletHelpForwardName</from-outcome> + <to-view-id>${useCase.portletHelpPath}.${jsfUtils.viewExtension}</to-view-id> + <redirect/> + </navigation-case> + </navigation-rule> +#end #end #foreach ($useCase in $useCases) #foreach ($rule in $useCase.navigationRules) 1.12 +6 -3 cartridges/andromda-jsf2/src/main/resources/templates/jsf2/controllers/Controller.java.vsl Index: Controller.java.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-jsf2/src/main/resources/templates/jsf2/controllers/Controller.java.vsl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -r1.11 -r1.12 --- Controller.java.vsl 28 Mar 2008 22:19:15 -0000 1.11 +++ Controller.java.vsl 29 Mar 2008 00:05:32 -0000 1.12 @@ -571,28 +571,31 @@ /** * Sets the portlet to the {@link javax.portlet.PortletMode#VIEW} mode. */ - public void setPortletModeView() + public java.lang.String portletModeView() throws javax.portlet.PortletModeException { this.setPortletMode(javax.portlet.PortletMode.VIEW); + return "${controller.useCase.portletViewForwardName}"; } /** * Sets the portlet to the {@link javax.portlet.PortletMode#EDIT} mode. */ - public void setPortletModeEdit() + public java.lang.String portletModeEdit() throws javax.portlet.PortletModeException { this.setPortletMode(javax.portlet.PortletMode.EDIT); + return "${controller.useCase.portletEditForwardName}"; } /** * Sets the portlet to the {@link javax.portlet.PortletMode#HELP} mode. */ - public void setPortletModeHelp() + public java.lang.String portletModeHelp() throws javax.portlet.PortletModeException { this.setPortletMode(javax.portlet.PortletMode.HELP); + return "${controller.useCase.portletHelpForwardName}"; } #end } \ No newline at end of file 1.4 +3 -3 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.3 retrieving revision 1.4 diff -u -w -r1.3 -r1.4 --- portlet.xml.vsl 28 Mar 2008 21:28:42 -0000 1.3 +++ portlet.xml.vsl 29 Mar 2008 00:05:32 -0000 1.4 @@ -9,15 +9,15 @@ <portlet-class>$portletClass</portlet-class> <init-param> <name>EditPage</name> - <value>${useCase.pathRoot}/${jsfUtils.toWebResourceName($useCase.name)}-portlet-edit.xhtml</value> + <value>${useCase.portletEditPath}.xhtml</value> </init-param> <init-param> <name>HelpPage</name> - <value>${useCase.pathRoot}/${jsfUtils.toWebResourceName($useCase.name)}-portlet-help.xhtml</value> + <value>${useCase.portletHelpPath}.xhtml</value> </init-param> <init-param> <name>ViewPage</name> - <value>${useCase.initialTargetPath}.xhtml</value> + <value>${useCase.portletViewPath}.xhtml</value> </init-param> <supports> <mime-type>text/html</mime-type> |
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> |
From: Chad B. <cwb...@us...> - 2008-05-13 22:18:20
|
User: cwbrandon Date: 08/05/13 15:18:27 Modified: andromda-jsf2/src/main/resources/templates/jsf2/configuration/portlet portlet.xml.vsl Log: get rid of unnecessary resource bundle reference Revision Changes Path 1.6 +0 -2 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.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- portlet.xml.vsl 11 Apr 2008 22:59:21 -0000 1.5 +++ portlet.xml.vsl 13 May 2008 22:18:27 -0000 1.6 @@ -32,8 +32,6 @@ <portlet-mode>edit</portlet-mode> <portlet-mode>help</portlet-mode> </supports> - <!--supported-locale>en</supported-locale> - <resource-bundle>com.lighthousepmg.portlet.dental.msgconfig.resources.language.Language</resource-bundle--> <portlet-info> <title>$useCase.name</title> <short-title>$useCase.name</short-title> |