[
https://jira.codehaus.org/browse/DISPL-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295454#comment-295454
]
Ron Bense commented on DISPL-677:
---------------------------------
Please find attached a version that supports both JSR-168 and JSR-286. A simple
change to two classes allowed transparent support for both specs.
(displaytag-portlet-1.2-jsr286.zip)
> Start supporting JSR-286 resources
> ----------------------------------
>
> Key: DISPL-677
> URL: https://jira.codehaus.org/browse/DISPL-677
> Project: DisplayTag
> Issue Type: Improvement
> Components: Container Compability
> Affects Versions: 1.2
> Reporter: Yannik Hampe
> Attachments: displaytag-portlet-1.2-jsr286.jar,
> jsr286-resource-addition.patch
>
> Original Estimate: 30 minutes
> Remaining Estimate: 30 minutes
>
> JSR-286 introduced resources which can be used for example to place AJAX
> calls for portlets. If one wants to generate HTML containing a table
> generated by displaytag and make that HTML fragment available to ajax calls,
> then one can use a resource request in contrast to a render request.
> Unfortunately this is not possible with the current displaytag-portlet-helper
> because in class PortletRequestHelper, line 66 the PortletResponse is casted
> to a RenderResponse:
> {code:java}
> this.renderResponse = (RenderResponse)
> pageContext.findAttribute(JAVAX_PORTLET_RESPONSE);
> {code}
> If a resource request is used the PortletResponse is not of type
> RenderResponse, but instead of type ResourceResponse which results in a
> ClassCastException.
> In JSR-286 RenderRequest und ResourceRequest both derive from MimeRequest
> which contains the methods for URL generation that displaytag needs.
> An easy fix would be to just replace all occurences of "RenderResponse" with
> "MimeResponse" in the portlet helper component. I did just that. Please find
> a patch attached. This will of course break backward compatibility to JSR
> 168. But a JSR-286 version could be offered as a separate jar file.
> For other people who stumble over the same problem that I did: Find a ready
> to use JAR-file in the attachment of this post. Just replace your
> displaytag-portlet-1.2.jar with the attached
> displaytag-portlet-1.2-jsr286.jar and things should work fine.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel