Please add the accessor:
public PageContext getPageContext(){ return pageContext; }
to TableTag. With this patch, it's easy to enable the displaytag to run
under portlets.
MOTIVATION/DETAILS
We're moving our system into a ~JSR 168 compliant portlet container.
Running under a portlet container means that the URLs output by the
system have to be completely rewritten to use the RenderURL's.
The approach I've taken is to define an Aspect that captures anytime an
internal navigation link is generated. I intercept the Href#toString(),
and instead generate a RenderURL with the same parameters. I've
attached the aspect I'm using.
I *think* my preference (long term) would be to modify the RequestHelper
and introduce the HttpServletRequest. Maybe add something like
createNavigationLink(request,href), and then provide configuration
options to switch between RequestHelper implementations via a property
file configured factory. It's a decent amount of patching, although if
there is interest, I can supply a patch.
To build yourself a portlet version of displaytag, you'll need a build
script something like this:
<path id="aspectj" >
<pathelement location="aspectjtools.jar"/>
<pathelement location="aspectjrt.jar"/>
</path>
<iajc destdir="${output}" source="1.4" debug="${with-tests}"
sourceRootCopyFilter="**/CVS/*,**/*.java"
injars="${meta}/server-lib/displaytag-1.0-b1.jar"
excludes="**/CVS/**/*.java" srcdir="${src}:${gensrc}">
<exclude name="**/CVS/**/*" />
<classpath refid="project.class.path" />
<classpath refid="aspectj"/>
</iajc>
PortletEnabledDisplayTag.aj
Description: PortletEnabledDisplayTag.aj
