フォーラム

ホーム » Liferay Portal » English » 2. Using Liferay » General

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Gabriel Frias
Page reload the previous state of the application in portlet (liferay)
2012/12/07 8:17
答え

Gabriel Frias

ランク: New Member

投稿: 8

参加年月日: 2012/07/27

最近の投稿

Hi Everyboy... well i need a little help with this problem...

This is my problem: I have a toolbar in my liferay in this toolbar I have the page named "Sistema", on this page I have a portlet with a login, my portlet is develop in primefaces, when you are loggin in the portlet it works fine, the problem is when you click in the toolbar of my liferay for example in "Sistema" the page reload the previous state, the page is in the loggin again and it must be in the second page of my portlet and not in the login, because i didn't close the session.

I know that the variables sessions of the portlets are actives because in the log of my tomcat it shows as not null.

Please help me!!!...

Thanks for you answers....
Neil Griffin
RE: Page reload the previous state of the application in portlet (liferay)
2012/12/07 8:24
答え

Neil Griffin

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2439

参加年月日: 2005/07/26

最近の投稿

Are you saying that your PrimeFaces portlet has the ability to login to Liferay, similar to what the out-of-the-box Liferay Sign-In portlet does?
Gabriel Frias
RE: Page reload the previous state of the application in portlet (liferay)
2012/12/07 8:33
答え

Gabriel Frias

ランク: New Member

投稿: 8

参加年月日: 2012/07/27

最近の投稿

Well Im using liferay only as a portlet container, so in my portlet when I loggin the portlet acces to my system developed in primefaces... im using a different loggin to access liferay control panel...

Thanks for your soon answer...
Neil Griffin
RE: Page reload the previous state of the application in portlet (liferay)
2012/12/07 9:53
答え

Neil Griffin

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2439

参加年月日: 2005/07/26

最近の投稿

OK, so first you have to login to Liferay Portal, then you display a PrimeFaces portlet that has a second login to access your other system?
Gabriel Frias
RE: Page reload the previous state of the application in portlet (liferay)
2012/12/07 12:38
答え

Gabriel Frias

ランク: New Member

投稿: 8

参加年月日: 2012/07/27

最近の投稿

Yes, my friend I think that the problem is the contextExternal because when I loggin in the primefaces portlet the log of my tomcat shows the contextExternal like this: com.liferay.faces.bridge.context.ExternalContextImpl@6fa874 so if the login is valid the contextExternal of my second page is com.liferay.faces.bridge.context.ExternalContextImpl@1067ce in that case i think its fine that the contextExternal has to change but when I click in my page "Sistema" again without logout, the contextExternal its diferent so that is why it redirect to the primefaces portlet loggin and i think that te contextExternal must be the same as it shows when i am in the second page ("com.liferay.faces.bridge.context.ExternalContextImpl@1067ce").

I wonder if i can control that when i am login in the primefaces portlet the contextExternal doesn't change.

If this is possible please tell me how can do it...

I thank you for all you answers...
Neil Griffin
RE: Page reload the previous state of the application in portlet (liferay)
2012/12/07 12:48
答え

Neil Griffin

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2439

参加年月日: 2005/07/26

最近の投稿

Every time there is a new request from the browser, Liferay Portal will create a corresponding PortletRequest and invoke the Portlet Lifecycle for GenericFacesPortlet. From there, it create an instance of Liferay Faces Bridge which creates a new FacesContext ThreadLocal instance. So that means that each request has a new FacesContext, and each new FacesContext will have its own new instance of ExternalContext.
Gabriel Frias
RE: Page reload the previous state of the application in portlet (liferay)
2012/12/07 13:14
答え

Gabriel Frias

ランク: New Member

投稿: 8

参加年月日: 2012/07/27

最近の投稿

Thanks for your explanation, So I wonder if its posible that i can program the button "Sistema" that shows my primeface portlet to get a way not to redirect to my loggin when i request i new instance of the External Context...

Can you tell me please??...