Yannik Hampe created DISPL-677:
----------------------------------
Summary: 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
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
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel