struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Krah <>
Subject Re: Xwork Question - how to Inject another instance than default
Date Fri, 06 Feb 2009 09:23:20 GMT
Am Freitag, 6. Februar 2009 06:59:30 schrieb Nils-Helge Garli Hegvik:
> I'm curious, why do you need a custom URL builder for Liferay?

To support the "custom" window states POP_UP and EXCLUSIVE liferay does 
Made the Helper a singleton instance injected into the PortletURLRenderer 
(missed the glue how to plugin my own one ... that why i am asking) and 
changed the visibility of getWindowState to protected.

So its easy to plugin in my custom implementation which does only override the 
getWindowState method ro read like this:

  if ("pop_up".equalsIgnoreCase(windowState)) {
                state = LiferayWindowState.POP_UP;
  } else if("exclusive".equalsIgnoreCase(windowState)) {
                state = LiferayWindowState.EXCLUSIVE;
if(state == null) {
	return super.getWindowState(....);

I thought doing it this way might be a good idea. Its working fine and enables 
me to use these custom window states.
I you got some "better" idea how to implement this "enhancement" don't bother 
to tell me please.



PS: Thought this might be good at the dev list because it is about developing 
the portlet2 plugin, however i am going to post this to the user list instead 
in the future.

Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.

Really, I'm not out to destroy Microsoft. That will just be a 
completely unintentional side effect."
	-- Linus Torvalds

View raw message