4 Replies Latest reply on Feb 25, 2013 12:15 PM by aftorre

    View Scope Fails After Ajax Request

    aftorre

      I am using the Portlet Bridge (3.2.0 Alpha2) in GateIn (3.5.0).  I created a very simple portlet that display a little text from the backing bean.  I am keeping track of when the bean is created.  The bean is view scoped.  Our users will regularly open up multiple tabs/windows in a browser and access the portal.  My hope is that making the backing bean for a portlet in view scope should properly handle different instances of the bean for each tab/window. 

       

      Here is what I found...

       

      If I open up a new browser instance and navigate to the portal page with my portlet, I can see my bean get created.  If I immediately then open up another tab/window and navigate to the same page I see that the bean is created for this second instance - great.  However, if I go back to the first tab and perform an ajax request.  In this case it was an a4j:commandButton that simply calls an action on my backing bean, the action is performed.  I then open up another tab and navigate to the page of interest and now the bean is no longer created, but this third instance is using the backing bean from the tab that created the ajax request.  From this time on, new tabs/windows no longer create new backing beans but use the backing bean that last submitted an ajax request.

       

      Any ideas why this may be happening?

       

      Thanks,

      Al

       

      Message was edited by: Albert Torre Added attachments for web page and backing bean.