フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Nicolas BODIN
[Resolved] Unexpected EDIT mode for my portlet on welcome pag
2007/11/30 12:45
答え

Nicolas BODIN

ランク: New Member

投稿: 13

参加年月日: 2007/11/29

最近の投稿

Using in Windows VISTA, tomcat and JDK 1.5 Liferay 4.3.4

I have defined two portlets (deployed as a war file).
My portlets supports EDIT and VIEW

When I am logged in i can create a page a place my portlet on a public welcome page. The administrator use the edit mode
to configure the portlets, then restore them to VIEW Mode.

So far everything is fine.
Then I Sign out from liferay portal (log out) and I am redirected as a guest to the welcome page :

unfortunately, some (3 out of 6) of my portlets instances are in EDIT mode !

Additonally, the portlet in EDIT mode have on the title bar the message "Return to full page" (And they are NOT maximized).

Even if as a guest I click on the portlet to force them back to VIEW mode (it works), if I come back late the
portlets (the same) are STILL in EDIT MODE.

Any Idea ? A Liferay bug or an issue in my (simple) config files ???

Thanks to all
 1
 2<?xml version="1.0"?>
 3<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 4.3.3//EN" "http://www.liferay.com/dtd/liferay-portlet-app_4_3_3.dtd">
 4
 5<liferay-portlet-app>
 6    <portlet>
 7        <portlet-name>simpleATPIPortlet</portlet-name>
 8        <instanceable>true</instanceable>
 9    </portlet>
10    <portlet>
11        <portlet-name>chartATPI</portlet-name>
12        <!--icon>/icon.png</icon-->
13        <instanceable>true</instanceable>
14        <!--header-portlet-css>/css/test.css</header-portlet-css>
15        <header-portlet-javascript>/js/test.js</header-portlet-javascript-->
16    </portlet>
17    <portlet>
18        <portlet-name>tableATPI</portlet-name>
19        <instanceable>true</instanceable>
20        <header-portlet-css>/css/bv_styles.css</header-portlet-css>
21        <header-portlet-javascript>/jsp/application/constantes_js.jsp</header-portlet-javascript>
22        <header-portlet-javascript>/js/TreePI.js</header-portlet-javascript>
23    </portlet>
24</liferay-portlet-app>



Event the database seems to be unconsitent (the view seems to be in VIEW mode on the screen but a select in the db returns :
select name, typeSettings from layout where typeSettings like '%chartATPI_WAR_dovapplication_INSTANCE_Axnl%'

(my portlet name)

1
2column-2=tableATPI_WAR_dovapplication_INSTANCE_FZjm,chartATPI_WAR_dovapplication_INSTANCE_tuEN,
3column-1=tableATPI_WAR_dovapplication_INSTANCE_ZdgM,tableATPI_WAR_dovapplication_INSTANCE_VQ23,chartATPI_WAR_dovapplication_INSTANCE_Axnl,chartATPI_WAR_dovapplication_INSTANCE_D2JS,
4[color=#F50F0F]mode-edit[/color]=tableATPI_WAR_dovapplication_INSTANCE_FZjm,tableATPI_WAR_dovapplication_INSTANCE_ZdgM,tableATPI_WAR_dovapplication_INSTANCE_VQ23,chartATPI_WAR_dovapplication_INSTANCE_Axnl,chartATPI_WAR_dovapplication_INSTANCE_tuEN,chartATPI_WAR_dovapplication_INSTANCE_D2JS,
5state-max=
6state-min=
7layout-template-id=2_columns_i
Nicolas BODIN
RE: Unexpected EDIT mode for my portlet on welcome page
2007/11/30 2:37
答え

Nicolas BODIN

ランク: New Member

投稿: 13

参加年月日: 2007/11/29

最近の投稿

I am using Liferay Enterprise Portal 4.3.4 (Owen / Build 4304 / November 5, 2007)

I made some tests with a dynamic view of my database :
the database in layout.typeSettings seems to be completely inconsistent.



The portlet names are always OK, the column for the portlet also, but the mode-edit property is completely different from what I have on the screen, and if I close and reopen my browser, I retrieve the values from the database

1
2column-2=chartATPI_WAR_dovapplication_INSTANCE_BbDE,
3column-1=tableATPI_WAR_dovapplication_INSTANCE_8U5p,tableATPI_WAR_dovapplication_INSTANCE_R0ne,
4mode-edit=tableATPI_WAR_dovapplication_INSTANCE_Wyhz,
5state-max=
6state-min=
7layout-template-id=2_columns_i


This is db content above, however nothing in on EDIT mode on the screen.

I do not really know what to do ? I hope I won't need to update the DB with my own request when closing the portlets ?

Any idea .P
Nicolas BODIN
RE: Unexpected EDIT mode for my portlet on welcome page
2007/11/30 3:40
答え

Nicolas BODIN

ランク: New Member

投稿: 13

参加年月日: 2007/11/29

最近の投稿

I download the LIFERAY sources and followed step by step in java code what happens and now I can figure out what
happens !

The layout I am working on is a public page (I'm just begining with liferay but it seems in the code that this kind of layouts are SHARED).

In ServicePreAction.java class :
 1
 2
 3        if ((layout != null) && layout.isShared()) {
 4
 5            // Updates to shared layouts are not reflected until the next time
 6            // the user logs in because group layouts are cached in the session
 7
 8            layout = (Layout)((LayoutImpl)layout).clone();
 9
10            LayoutClone layoutClone = LayoutCloneFactory.getInstance();
11
12            if (layoutClone != null) {
13                String typeSettings = layoutClone.get(req, layout.getPlid());


the codes makes a COPY to reflect the effect only on next session.

Then I have many layout instances, and if I switch one portlet to EDIT mode, the back to VIEW mode it is done on my layout instance but not globally. I I open another portlet in EDIT mode then back in view mode, in the second layout it is OK, but this is resetting the first portlet to its original state since the second layout is setting all properties overriding what the first session has done.

What I can not really understand yet is why I have one layout copy for every portlet and why we clone it each time ! and not one for the user session;

Likely a bug, and likely it happens only on public pages.
JR Houn
RE: Unexpected EDIT mode for my portlet on welcome page
2007/11/30 9:52
答え

JR Houn

LIFERAY STAFF

ランク: Expert

投稿: 489

参加年月日: 2007/11/19

最近の投稿

Hey Nicolas-
I'm glad to hear you were able to figure our the source of your problems with the portlets you created. Could you please add (Resolved) to the subject header of your thread? However, if you do believe you've found a bug try submitting it as an issue in support.liferay.com.
jr
Nicolas BODIN
RE: Unexpected EDIT mode for my portlet on welcome page
2007/11/30 12:47
答え

Nicolas BODIN

ランク: New Member

投稿: 13

参加年月日: 2007/11/29

最近の投稿

reported as bug http://support.liferay.com/browse/LEP-4395