You will need to provide an implementation of RequestHelperFactory,
which is responsible for providing RequestHelper objects.
We use an internally developed JSR 168 portlet server called Pegboard;
here is the code we use to customize for DisplayTag. It should (roughly)
work for any 168 portlet server. (There is also an aspect to help with
exports, but that is somewhat unrelated.)
// RequestHelperFactory
public RequestHelper getRequestHelperInstance(PageContext pageContext)
{
HttpServletRequest request = (HttpServletRequest)
pageContext.getRequest();
HttpServletResponse response =
(HttpServletResponse)pageContext.getResponse() ;
RenderResponse resp = (RenderResponse)
pageContext.findAttribute("javax.portlet.response");
if ( resp != null ){
return new DisplaytagPegboadRequestHelper( resp, request,
response);
} else {
return new DefaultRequestHelper( request, response);
}
}
// DefaultRequestHelper
public DisplaytagPegboadRequestHelper(RenderResponse renderResponse,
HttpServletRequest httpServletRequest, HttpServletResponse
httpServletResponse) {
super(httpServletRequest, httpServletResponse);
this.renderResponse = renderResponse;
}
public Href getHref() {
PortletURL url = renderResponse.createRenderURL();
url.setParameters(getParameterMap());
Href href = new Href(url.toString());
return href;
}
>
> Hi there,
>
> I have been trying to use DisplayTag with Java Portlet. I am
> using the paging feature of DisplayTag as I have large
> collection of data to present. So once configuring paging
> attribute like below,
>
> <display:table name="${pageList}" pagesize="3">
>
> The jsp page displays first 3 records and it also display
> links for Next/Last for navigation.
>
> Now the problem is that, these Next/Last links are not
> working. Because the display tag by default creates a
> relative link to the JSP but Portlet container doesn't take
> the URL as it requires either ActionURL or RenderURL.
>
> How can I configure ActionURL or RenderURL links within
> data I am displaying through DisplayTag.
>
> Any suggestions/ comment would be really helpful.
> Thanks,
> Hiren.
>
>
>
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user