I am trying to get portlet markup headers working with gatein. This
allows portlets to set content in the html head of the portal page. This
only works if the portlets are processed before the page gets generated,
which is currently not the case.
We can get around this by creating a preRender phase to the webui
lifecycle. This phase would generate the markup for the uicomponent and
store it. When the processRender phase occurs, it will just retrieve
this stored markup.
Adding a new phase to the lifecycle is going to require a bunch of
changes to webui.
I already have a simple proof of concept with a preRender phase that is
working with portlets to allow setting the html head.
Before I get too far with this, I would to know if anyone else has any
better ideas about how to handle this.
We could modify the html head using javascript that gets called when the
page is loaded. This will work and would be easy to implement, but seems
like a hack.
I looked into seeing if we could just modify how the UIPortalApplication
gets rendered so that we wouldn't need to touch the rest of the webui
lifecyle. We could do something like render the html body to a temporary
writer first, but this is a messy hack.