|
From: Nick L. <nl...@es...> - 2004-09-08 23:37:27
|
> Nick Lothian wrote: > > I've managed to get the Spring taglibs working with > portlets. I've got some > > work to do still on making my changes somewhat less > brutally hackish, but > > after that I'd like to try and get them re-integrated. > > > > The patches for this aren't trivial (although they are > confined to the > > sandbox). What's the best way to submit them? > > Can you email me a patch file and a description of the changes? > I've actually raised an issue in JIRA for this (I've included a port of the MVC tutorial code, and that got a big big for email): http://opensource.atlassian.com/projects/spring/browse/SPR-317 Description of Patch (http://opensource.atlassian.com/projects/spring/secure/attachment/10209/Por tletSupportPatch.txt) starting at the top: PortletRequestParameterPropertyValues.java: Modified the PortletRequestParameterPropertyValues(PortletRequest request) constructor to work by calling super(request.getParameterMap()); Previously it called another constructor which had all its code commented out. DispatcherPortlet.java: add DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE and DispatcherServlet.THEME_RESOLVER_ATTRIBUTE as request attributes. DispatcherServlet.THEME_RESOLVER_ATTRIBUTE currently is just a FixedThemeResolver. FrameworkPortlet.java: Sets the ServletContext on the PortletApplicationContext PortletApplicationContext.java: now extends WebApplicationContext, and has setServletContext and getServletContext methods XmlPortletApplicationContext.java: added get/set Theme and ServletContext methods. SimplePortletFormController.java: New class. This is similar to the web SimpleFormController. It has a list of TODOs at the top - mostly relating to functionality that is missing compared to SimpleFormController, and to a lack of extensibility. TomcatViewRendererServlet.java: Extends ViewRendererServlet and implements doPost (which it passes to the doGet method). This is to work around the issue when redirecting from a POST'ed request to a Servlet which only implements doGet. (You should get a method not supported error, but due to the wrapped ServletRequest from the Portlet you'll get a NPE instead). Let me know if there is anything that needs fixing. I hope this will be useful! Nick |