you can do this with the "rendering" configuration of the portlet (or window... not sure where you can put this configuration exactly, if not in both of them).
see the reference documentation about the Renderer.
you have a "empty renderer" available, then if that do what you need, you only have to set the configuration to that renderer.
if not, you may code your own class of renderer, and register them and use them in for the considered portlets.
sorry to answer late,
hope it helps still,
JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS.
http://Antoine JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS. http://www.sysemo.com/Sysemo-expertise-portails-jboss-portal.phphttp://www.sysemo.com/Sysemo-expertise-portails-jboss-portal.php