You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2008/10/07 19:10:26 UTC

Portlet Render Question if more than one Struts Portlet is involved - Loosing State

Hi,

maybe a little bit OT but maybe its struts related, don't know yet.
I've got two portlets written with struts2 2.0.11.2.
I've create a page and did both of them onto it.

Lets say Portlet 1 got "Step 1 and Step 2" and Portlet 2 too.

Pluto:

I click on the button to go to Step 2 of Portlet 1.

Result:
Portlet 1 is in Step 2.
Portlet 2 is still in initial Step 1 state.

Than i click on the button in Portlet 2 to go to Step 2.

Result:
Portlet 1 is still in Step 2 (good).
Portlet 2 is now in Step 2.

debug log show something like this:

18:50:01,904 DEBUG [org.apache.struts2.portlet.util.PortletUrlHelper] 
Resulting actionPath: /view/mw/mvc/startMaster
18:50:01,904 DEBUG [org.apache.struts2.portlet.util.PortletUrlHelper] Creating 
action url
18:50:01,906 DEBUG [org.apache.struts2.components.UIBean] Rendering 
template /template/simple/form-close
18:50:01,907 DEBUG 
[org.apache.struts2.components.template.FreemarkerTemplateEngine] Rendering 
template /template/simple/form-close.ftl
18:50:01,909 DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] 
Leaving render
18:50:01,914 DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher] 
Entering render
18:50:01,915 DEBUG [org.apache.struts2.portlet.PortletRequestMap] Dumping 
request parameters: 


The same stuff in Liferay:

I click on the button to go to Step 2 of Portlet 1.

Result:
Portlet 1 is in Step 2.
Portlet 2 is still in initial Step 1 state.

Than i click on the button in Portlet 2 to go to Step 2.

Result:
Portlet 1 is now again in initial State - Step 1 (BAD)
Portlet 2 is now in Step 2.

The log is different:

18:53:35,912 INFO  [STDOUT] 18:53:35,912 DEBUG 
[org.apache.struts2.portlet.util.PortletUrlHelper] Resulting 
actionPath: /view/mw/mvc/startMaster
18:53:35,912 INFO  [STDOUT] 18:53:35,912 DEBUG 
[org.apache.struts2.portlet.util.PortletUrlHelper] Creating action url
18:53:35,916 INFO  [STDOUT] 18:53:35,916 DEBUG 
[org.apache.struts2.components.UIBean] Rendering 
template /template/simple/form-close
18:53:35,916 INFO  [STDOUT] 18:53:35,916 DEBUG 
[org.apache.struts2.components.template.FreemarkerTemplateEngine] Rendering 
template /template/simple/form-close.ftl
18:53:35,960 INFO  [STDOUT] 18:53:35,960 DEBUG 
[org.apache.struts2.portlet.PortletRequestMap] Dumping request parameters: 


The "Leaving Render" and "Entering Render" is gone @Liferay.

Whats the correct behaviour, i thought what pluto does is right, isn't it?
Does anyone know why this may happen, or does anyone have an idea why those 
containers behave different and how it can be fixed?

thx

-- 
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html

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

Re: Portlet Render Question if more than one Struts Portlet is involved - Loosing State

Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
It's hard to say without seeing some code and configuration files. The
only difference I can think of is with the actualy deployment process
for each container. There are potentially several different
configuration files depending on the server you're deploying in. It's
a while since I've looked at Liferay, but could it be that the two
deployments refer to the same portlet instance or something? Or maybe,
since the rendering phase appears to have "gone", it's a caching
issue?

Nils-H

On Tue, Oct 7, 2008 at 7:10 PM, Torsten Krah
<tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Hi,
>
> maybe a little bit OT but maybe its struts related, don't know yet.
> I've got two portlets written with struts2 2.0.11.2.
> I've create a page and did both of them onto it.
>
> Lets say Portlet 1 got "Step 1 and Step 2" and Portlet 2 too.
>
> Pluto:
>
> I click on the button to go to Step 2 of Portlet 1.
>
> Result:
> Portlet 1 is in Step 2.
> Portlet 2 is still in initial Step 1 state.
>
> Than i click on the button in Portlet 2 to go to Step 2.
>
> Result:
> Portlet 1 is still in Step 2 (good).
> Portlet 2 is now in Step 2.
>
> debug log show something like this:
>
> 18:50:01,904 DEBUG [org.apache.struts2.portlet.util.PortletUrlHelper]
> Resulting actionPath: /view/mw/mvc/startMaster
> 18:50:01,904 DEBUG [org.apache.struts2.portlet.util.PortletUrlHelper] Creating
> action url
> 18:50:01,906 DEBUG [org.apache.struts2.components.UIBean] Rendering
> template /template/simple/form-close
> 18:50:01,907 DEBUG
> [org.apache.struts2.components.template.FreemarkerTemplateEngine] Rendering
> template /template/simple/form-close.ftl
> 18:50:01,909 DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher]
> Leaving render
> 18:50:01,914 DEBUG [org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher]
> Entering render
> 18:50:01,915 DEBUG [org.apache.struts2.portlet.PortletRequestMap] Dumping
> request parameters:
>
>
> The same stuff in Liferay:
>
> I click on the button to go to Step 2 of Portlet 1.
>
> Result:
> Portlet 1 is in Step 2.
> Portlet 2 is still in initial Step 1 state.
>
> Than i click on the button in Portlet 2 to go to Step 2.
>
> Result:
> Portlet 1 is now again in initial State - Step 1 (BAD)
> Portlet 2 is now in Step 2.
>
> The log is different:
>
> 18:53:35,912 INFO  [STDOUT] 18:53:35,912 DEBUG
> [org.apache.struts2.portlet.util.PortletUrlHelper] Resulting
> actionPath: /view/mw/mvc/startMaster
> 18:53:35,912 INFO  [STDOUT] 18:53:35,912 DEBUG
> [org.apache.struts2.portlet.util.PortletUrlHelper] Creating action url
> 18:53:35,916 INFO  [STDOUT] 18:53:35,916 DEBUG
> [org.apache.struts2.components.UIBean] Rendering
> template /template/simple/form-close
> 18:53:35,916 INFO  [STDOUT] 18:53:35,916 DEBUG
> [org.apache.struts2.components.template.FreemarkerTemplateEngine] Rendering
> template /template/simple/form-close.ftl
> 18:53:35,960 INFO  [STDOUT] 18:53:35,960 DEBUG
> [org.apache.struts2.portlet.PortletRequestMap] Dumping request parameters:
>
>
> The "Leaving Render" and "Entering Render" is gone @Liferay.
>
> Whats the correct behaviour, i thought what pluto does is right, isn't it?
> Does anyone know why this may happen, or does anyone have an idea why those
> containers behave different and how it can be fixed?
>
> thx
>
> --
> Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
> Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html
>
> Really, I'm not out to destroy Microsoft. That will just be a
> completely unintentional side effect."
>        -- Linus Torvalds
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org