You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-dev@portals.apache.org by "James May (JIRA)" <br...@portals.apache.org> on 2006/09/25 19:25:51 UTC

[jira] Created: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Multiple instances of a struts portlet should be able to coexist on a single page.
----------------------------------------------------------------------------------

                 Key: PB-49
                 URL: http://issues.apache.org/jira/browse/PB-49
             Project: Portals Bridges
          Issue Type: Improvement
          Components: struts
    Affects Versions: 1.0
         Environment: Any.
            Reporter: James May
            Priority: Minor


When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "James May (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462351 ] 

James May commented on PB-49:
-----------------------------

Hi Ate. I've uploaded a 'cleaner' version of the patch (patch-2007-01-04.zip). Please use the new patch files when working on this. Also the new zip file contains a document describing the changes in the patch.


Thanx
James

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Assigned: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma reassigned PB-49:
---------------------------

    Assignee: Ate Douma

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "James May (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-49?page=comments#action_12449664 ] 
            
James May commented on PB-49:
-----------------------------

I have a working fix for this as I described here: http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200609.mbox/browser.

I was waiting to get some feedback on this approach before generating patch files for this fix. I will try to extract my changes and upload them as patch files this week.


Thanks
James 

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: http://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Improvement
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>            Priority: Minor
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462083 ] 

Ate Douma commented on PB-49:
-----------------------------

James,

Thanks very much for the patch. I'll try to look into it this weekend.

Ate

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463790 ] 

Ate Douma commented on PB-49:
-----------------------------

Hi James,

After testing out your patch with my above described changes I found out it still didn't work correctly.
Neither the solution for handling mode switches (PB-38), nor for multiple instances on a single page (this issue).
But, I think I found different solutions for both which work reasonable, albeit with some caveats.

I'll try to explain both issues and the problems here.

First the handling the mode switches (PB-38).
The problem comes from the last part of the Portlet Specification rule PLT.11.1.1.lii (page 43), which says:

"Commonly, portals provide controls to change the portlet mode and the window state of portlets.
 The URLs these controls use are generated by the portal.
 Client requests triggered by those URLs must be treated as render URLs and the existing render parameters must be preserved."

This means that when a user switches mode using one of these control icons, only the mode changes.
So, when the Struts Bridge is in view mode with (Struts) PAGE render parameter /show/shoppingcard.do, and the user switches to edit mode,
the PAGE render parameter still points to /show/shoppingcard.do.
In your patch you cater for this issue by storing the current mode in the session, and when a mode switch occurs, you ignore the PAGE render url
and render the edit mode default page instead, as well as store the new mode in the session.
BUT: the PAGE render parameter still points to /show/shoppingcard.do.
If thereafter the user refreshes the page or interacts with a different portlet on the page, the Struts portlet will render again but this time
it won't see a mode switch anymore (as there is none) and use the PAGE render parameter *still* pointing to /show/shoppingcard.do and render the
wrong page in edit mode.

While I can imagine the reason why the JSR-168 spec team decided to require that the existing render parameters must be preserved when switching
mode through the portal provided controls, this really poses a non-solvable problem when you use the same (named) render parameters in different modes.
This not only affects the bridge behavior itself, but any portlet logic depending on render parameters when using multiple modes.
Effectively, this rule requires one to use distinctly named render parameters for each mode.

So, I've written a "solution" for this by indeed using different PAGE render parameters for each mode,PAGE+request.getPortletMode.toString().
For action PAGE parameters this isn't needed as its a single invocation process.
This also removes the need to check for mode changes during rendering and saving the current mode in the session.

Still, its not a perfect solution because once you switch modes *and* interact with the portlet in this new mode, you will "lose" the PAGE render parameter for the previous mode and switching back to that mode thereafter will result in falling back to the default page.
So, this solution will only "remember" your current PAGE in the previous mode if you switch back immediately.

Going further than this, for instance by keeping each mode PAGE parameter in the session, introduces lots of other potential problems and complexities I don't have the time right now to investigate and solve, so for now this has to do.
If you or someone else needs a more complete solution please do send in additional patches and I will try to evaluate and apply them if possible of course.

Then there is the problem of handling multiple struts portlets on a single page (this issue).
I'm sorry to say but after trying out your solution with the JPetstore demo application it broke down immediately.
This is because your solution properly separates session form beans by storing them under a unique (generated) name, but thereby also makes them unfindable for non-form tag based code which tries to look them up, like a bean:define tag.
And this is never solvable this way as someone can just as well have written java code in an Action trying to lookup a form bean directly from the session too.
Or what about other, custom (non Struts framework related) session attributes? Using those will also result in thrashing interactions when using multiple instances on the same page.

So, the only proper solution to this is forcing the whole of the Struts portlet code to use the PortletSession in PORTLET_SCOPE.
That way, each instance will have its own isolated "namespace" within the global application session without fear of trashing each others (session) state.
I did write an implementation for this by providing a (proxy based) wrapping of the session given to the StrutsServlet.
It works perfectly and requires little or no change to the Struts Bridge code.
There is one (possibly) big caveat though...
If the Struts portlet also needs separate, client invoked servlet interaction which also depends on its session state, this will break down.
Consider rendering a pdf based on session state (like checking a security ticket or whatever). That cannot be done directly from a portlet so one needs to generate a link (or client-side) javascript which will call back from the client browser to a servlet.
That servlet won't be able to "connect" with the portlet (instance) session anymore without knowledge of the namespace (PortletWindow id) with which the session attributes are encoded. So, existing code, unaware of the new "namespacing" of the Struts portlet instance session is going to break because of this.
On the other hand, having two Struts portlet instances on a single page when trying to use a feature like this is likewise going to fail anyway too.

Because of this caveat, I'm planning to provide this solution as a optional, configurable and non-default new feature.
By providing a portlet init parameter portletScopeStrutsSession=true, or extending the protected boolean StrutsPortlet.getPortletScopeStrutsSession() method (which will only be invoked during the init() method) you can override the default behavior.
Furthermore, I'll provide an PortletWindowUtils class (in the bridges common jar) through which you can retrieve the current instance PortletWindowId,
as well as get the full application scope session attribute name for a portlet scoped session attribute name.
By providing a portletWindowId to a separately, client browser invoked, servlet (as a query string parameter for instance), such a servlet will be able to "connect" with the portlet/struts instance session again, but of course you will be required to modify existing code to be able to make use of it.

I plan to commit this feature as well as my solution for PB-38 this weekend.

Regards, Ate

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462731 ] 

Ate Douma commented on PB-49:
-----------------------------

James,

I've started looking at your patch and I have a few initial comments:

In StrutsPortlet, you use the PortletWindow and PortletUtils from Pluto to obtain the window Id.
I can't use those dependencies in the bridge as it should remain container independant.
But, there is another, portlet spec compliant way, to obtain the window id, although it requires (temporarily) usage of the PortletSession.
I will use that solution instead.
Furthermore, I will use the name WindowId instead of EntityId as PortletWindow != PortletEntity.

Secondly, your PortletActionMappingImpl extends com.fmr.eps.struts.action.FMRModelDispatchActionMapping.
As I can't have (nor can use) the FMRModelDispatchActionMapping, I removed the extends bit for now.
I haven't really interpreted its functionality (will do so later this weekend), but if your FMRModelDispatchActionMapping provides functionality I would need, please let me know ASAP.
 


> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Updated: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "James May (JIRA)" <br...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James May updated PB-49:
------------------------

    Attachment: patch-2007-01-04.zip

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462763 ] 

Ate Douma commented on PB-49:
-----------------------------

James,

After further reviewing your patch, Im curious why you also add the EntityId (actually the much longer EntityKey) to request attributes and render parameters?
Request attributes are already only scoped to the current Portlet(Window), so I don't see why that should be nessacery.
And render parameters by itself already have the current window id encoded (hidden), so those too already target only the current PortletWindow.
Which leaves session attributes, for which your solution is fine, although I think I prefer to use just the EntityId (which I will call WindowId) as its much shorter than the generated EntityKey.

If I remove the adding of the entityId to the request and render parameters the number of required changes will also be much smaller :)
Please let me know if I misunderstood the intended purpose of this though.

I'll have to review the patch a little further, but so far it looks great.
As far as I can see, the Form lookup handling as well as storing the RenderContextAttributes in the PortletSession are good solutions to the problem.

The PortletActionMapping I also need to review further, and I probably will take it out of the resolution of this issue and create a new feature issue for it and commit it separately.

The definition of the static PortletContext getStrutsPortletContext() method on StrutsPortlet I think is wrong by the way.
Different StrutsPortlets (not instances) will have a different PortletContext, so a static reference to one of them can't be right.
If you do need something like this (and don't use different StrutsPortlets) I suggest adding a similar method to an extended StrutsPortlet base class of your own.  

Finally, a PortletMode should never be stored directly in a session as it is not serializable.
That will cause problems with clustered enviroments, so I will use the String representation of a PortletMode.

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "walter meng (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-49?page=comments#action_12449561 ] 
            
walter meng commented on PB-49:
-------------------------------

Ate
Could you suggest a way to fix this issue?

Thanks,
walter

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: http://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Improvement
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>            Priority: Minor
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "James May (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462761 ] 

James May commented on PB-49:
-----------------------------

Hi Ate. Please see my responses below. Let me know if you have any further questions.

Thanx
James


>>But, there is another, portlet spec compliant way, to obtain the windowid,
>>although it requires (temporarily)usage of the PortletSession.
>>I will use that solution instead.

Good point. I thought that the pluto imports may be a problem.

>>Furthermore, I will use the name WindowId instead of EntityId as
>>PortletWindow != PortletEntity.

Good point.

>>Secondly, your PortletActionMappingImpl extends
>>com.fmr.eps.struts.action.FMRModelDispatchActionMapping.
>>As I can't have (nor can use) the FMRModelDispatchActionMapping, I
>>removed the extends bit for now.
>>I haven't really interpreted its functionality (will do so later this
>>weekend), but if your FMRModelDispatchActionMapping provides
>>functionality I would need, please let me know ASAP.
 
This is my mistake. I forgot the remove that. The action mapping class should extend the struts ActionMapping directly. I was testing in an application that needed the FMRModelDispatchActionMapping and forgot to change it back. As far as the functionality of PortletActionMappingImpl, it is not required for the fix but is merely another way of declaring render attributes. Maybe having two places to declare attributes is a
bad idea but it seems more natural to me to do this at the actionMapping level. The PortletActionMapping can be removed all together if need be.


> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Resolved: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma resolved PB-49.
-------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.1

Fixed

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>             Fix For: 1.0.1
>
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Marian Simpetru (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-49?page=comments#action_12459279 ] 
            
Marian Simpetru commented on PB-49:
-----------------------------------

If your portlet would display an article or a banner, an won't be able to use more than one instance per page, you would consider-it more important than an improuvement. Portlets shoud not be independent in execution? 
Sure you'll never have a weather portlet twice in a page...


> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: http://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Improvement
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>            Priority: Minor
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "James May (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462078 ] 

James May commented on PB-49:
-----------------------------

I've uploaded a patch to fix this issue as well as PB-38. The problem I was seeing with the edit mode icon seems to be related to a specific jetspeed build or installation. The same code works as expected in one portal installation but not in another. Someone please let me know if you encounter this problem when you get a chance to test this fix.

You will notice that there is a new (optional) PortletActionMapping. I will post more about this soon.

James

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Attachments: patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464674 ] 

Ate Douma commented on PB-49:
-----------------------------

I haven't been able to spend time on this issue or PB-38 this weekend. Will try to find some time this week.

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Assigned To: Ate Douma
>         Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Updated: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "James May (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James May updated PB-49:
------------------------

      Priority: Major  (was: Minor)
    Issue Type: Bug  (was: Improvement)

I've updated the severity of this issue because I've received several messages from user's saying that is a critical issue for them. I've also changed the issue type to bug because it is incorrect to assume that only one instance of a portlet will exist at a time. It is perfectly reasonable to assume that a weather portlet, for example, may appear serveral times on a page with each instance displaying weather data for different areas of the globe. Changes to one portlet instance (form bean, render attributes, portlet mode, etc.) should not affect other instances. 

I have spent a considerable amount of time creating a fix for this: Here is what I've acheived so far:
The struts bridge (my local) now -
* correctly handles form beans for multiple portlet instances
* correctly handles render attributes for multiple instances
* remembers the portlet mode of each instance and correctly remembers the last page when switching modes (see PB-38)

One outstanding issue that I'm facing is this: When changing from view mode to edit mode, the edit page displays correctly. However after a subsequent render request, the mode icon for that portlet instance changes back to the pencil icon, as if the portlet is in view mode. The edit page still displays and request.getPortletMode().toString() returns "edit". So why is the mode icon and link changing? This has me stumped. Any ideas on this would be appreciated.

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: http://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Updated: (PB-49) Multiple instances of a struts portlet should be able to coexist on a single page.

Posted by "Anonymous (JIRA)" <br...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]


    Attachment: patch.zip

> Multiple instances of a struts portlet should be able to coexist on a single page.
> ----------------------------------------------------------------------------------
>
>                 Key: PB-49
>                 URL: https://issues.apache.org/jira/browse/PB-49
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Any.
>            Reporter: James May
>         Attachments: patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data for the portlet instances gets clobbered because there is a single form bean that is shared by all instances. Each portlet instance should be able to maintain its state independently of other instances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org