Author: theute
Date: 2012-01-11 10:55:00 -0500 (Wed, 11 Jan 2012)
New Revision: 8290
Removed:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PortalTemplateConfigOption.java
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/
Log:
JBEPP-1436: EPP-SP Broken portalsite template
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/xss:7377-7595,7597
/portal/branches/xss-issues:7350-7351,7358
/portal/trunk:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450,7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7741,7748,7773,7780,7877,7900,7928,7938,8045,8053,8072
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/xss:7377-7595,7597
/portal/branches/xss-issues:7350-7351,7358
/portal/trunk:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450,7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7741,7748,7773,7780,7857,7877,7900,7928,7938,8045,8053,8072
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7900,7906,7928,7938,8045,8053,8072
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7857,7877,7900,7906,7928,7938,8045,8053,8072
Property changes on: epp/portal/branches/EPP_5_2_Branch/component/portal
___________________________________________________________________
Modified: svn:mergeinfo
- /portal/branches/branch-GTNPORTAL-1592/component/portal:4868,4875
/portal/trunk:7451
/portal/trunk/component/portal:7085,7412,7451,7500,7570-7571,7573,7577,7614-7615,7695-7696,7701-7704,7748,7773,7780,7877,7900,7928,7938,8045,8053,8072
+ /portal/branches/branch-GTNPORTAL-1592/component/portal:4868,4875
/portal/trunk:7451
/portal/trunk/component/portal:7085,7412,7451,7500,7570-7571,7573,7577,7614-7615,7695-7696,7701-7704,7748,7773,7780,7857,7877,7900,7928,7938,8045,8053,8072
Property changes on:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7900,7906,7928,7938,8045,8053,8072
/portal/trunk/src/main/java/org:7451
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7857,7877,7900,7906,7928,7938,8045,8053,8072
/portal/trunk/src/main/java/org:7451
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2012-01-11
15:55:00 UTC (rev 8290)
@@ -43,7 +43,6 @@
import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.OrganizationService;
import org.picocontainer.Startable;
-
import java.util.*;
/**
@@ -624,4 +623,14 @@
{
return newPortalConfigListener_.getDefaultPortal();
}
+
+ public Set<String> getPortalTemplates()
+ {
+ return newPortalConfigListener_.getTemplateConfigs(PortalConfig.PORTAL_TYPE);
+ }
+
+ public PortalConfig getPortalConfigFromTemplate(String templateName)
+ {
+ return
newPortalConfigListener_.getPortalConfigFromTemplate(PortalConfig.PORTAL_TYPE,
templateName);
+ }
}
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UISelector/UIItemSelector/Stylesheet.css 2012-01-11
15:55:00 UTC (rev 8290)
@@ -1,4 +1,3 @@
-
.UIItemSelector {
margin: 2px 0px 2px 2px; /* orientation=lt */
margin: 2px 2px 2px 0px; /* orientation=rt */
@@ -24,7 +23,7 @@
background: url('background/TemplateContainer.jpg') no-repeat center -836px;
}
-.UIItemSelector .ItemDetailList .TemplateContainer .ClassicPortalImage {
+.UIItemSelector .ItemDetailList .TemplateContainer .classicImage {
height: 222px;
background: url('background/TemplateContainer.jpg') no-repeat center -392px;
margin-top: 9px;
@@ -35,13 +34,13 @@
background: url('background/TemplateContainer.jpg') no-repeat center -170px;
margin-top: 9px;
}
-
-.UIItemSelector .ItemDetailList .TemplateContainer .BasicPortalImage {
- height: 222px;
- background: url('background/TemplateContainer.jpg') no-repeat center -1052px;
- margin-top: 9px;
-}
+.UIItemSelector .ItemDetailList .TemplateContainer .basicImage {
+ height: 222px;
+ background: url('background/TemplateContainer.jpg') no-repeat center -1052px;
+ margin-top: 9px;
+}
+
.UIItemSelector .TemplateContainer .DefaultImage {
height: 222px;
background: url('background/TemplateContainer.jpg') no-repeat center -392px;
@@ -138,15 +137,15 @@
margin: 0px 5px 0px 5px;
}
-.UIItemSelector .RightColumnStyle .ItemDetailList .Title {
- width: 300px; overflow: hidden;
-}
-
+.UIItemSelector .RightColumnStyle .ItemDetailList .Title {
+ width: 300px; overflow: hidden;
+}
+
.UIItemSelector .RightColumnStyle .ItemListContainer .Title {
- width: 143px; overflow: hidden;
-}
-
-.UIItemSelector .RightColumnStyle .Title {
+ width: 143px; overflow: hidden;
+}
+
+.UIItemSelector .RightColumnStyle .Title {
line-height: 22px; white-space: nowrap;
font-weight: bold; color: #5c5c5c;
float: left; /* orientation=lt */
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2012-01-11
15:55:00 UTC (rev 8290)
@@ -874,8 +874,8 @@
UIPortalBrowser.msg.Invalid-createPermission=You do not have the right to create a new
portal. Contact the administrator.
UIPortalBrowser.deletePortal=Are you sure you want to delete this portal?
SitePortal.label=Site Portal
-ClassicPortal.label=Classic Portal
-BasicPortal.label=Basic Portal
+classic.label=Classic Portal
+basic.label=Basic Portal
############################################################################
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2012-01-11
15:55:00 UTC (rev 8290)
@@ -809,7 +809,8 @@
UIPortalBrowser.msg.Invalid-createPermission=Vous n'avez pas le droit de créer un
nouveau portail. Contactez un administrateur SVP.
UIPortalBrowser.deletePortal=Confirmez-vous la suppression de ce portail ?
SitePortal.label=Portail Site
-ClassicPortal.label=Portal Classique
+classic.label=Portal Classique
+basic.label=Portal Base
############################################################################
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/basic/portal.xml 2012-01-11
15:55:00 UTC (rev 8290)
@@ -25,6 +25,8 @@
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0
http://www.gatein.org/xml/ns/gatein_objects_1_0"
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
<portal-name>@owner@</portal-name>
+ <label>Basic Portal</label>
+ <description>This is basic portal template</description>
<locale>en</locale>
<access-permissions>Everyone</access-permissions>
<edit-permission>*:/platform/administrators</edit-permission>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/template/classic/portal.xml 2012-01-11
15:55:00 UTC (rev 8290)
@@ -25,6 +25,8 @@
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0
http://www.gatein.org/xml/ns/gatein_objects_1_0"
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
<portal-name>@owner@</portal-name>
+ <label>Classic Portal</label>
+ <description>This is classic portal template</description>
<locale>en</locale>
<access-permissions>Everyone</access-permissions>
<edit-permission>*:/platform/administrators</edit-permission>
Deleted:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy 2012-01-11
15:55:00 UTC (rev 8290)
@@ -1,40 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-import java.util.List;
-import java.util.ArrayList;
-import org.exoplatform.portal.webui.portal.PortalTemplateConfigOption ;
-import org.exoplatform.webui.core.model.SelectItemCategory;
-
-List options = new ArrayList();
-
- SelectItemCategory basic = new SelectItemCategory("BasicPortal");
- basic.addSelectItemOption(
- new PortalTemplateConfigOption("Basic Portal", "basic",
"Basic Portal", "BasicPortal").addGroup("/platform/guest")
- );
- options.add(basic);
-
- SelectItemCategory guest = new SelectItemCategory("ClassicPortal");
- guest.addSelectItemOption(
- //new PortalTemplateConfigOption("", "site", "Site
Portal", "SitePortal").addGroup("/guest")
- new PortalTemplateConfigOption("", "classic", "Classic
Portal", "ClassicPortal").addGroup("/platform/guests")
- );
- options.add(guest);
-
-return options ;
Deleted:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PortalTemplateConfigOption.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PortalTemplateConfigOption.java 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PortalTemplateConfigOption.java 2012-01-11
15:55:00 UTC (rev 8290)
@@ -1,54 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.webui.portal;
-
-import org.exoplatform.webui.core.model.SelectItemOption;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by The eXo Platform SARL
- * Author : Pham Dung Ha
- * ha.pham(a)exoplatform.com
- * May 11, 2007
- */
-public class PortalTemplateConfigOption extends SelectItemOption<String>
-{
-
- private List<String> accessGroup_;
-
- public PortalTemplateConfigOption(String label, String value, String desc, String
icon) throws Exception
- {
- super(label, value, desc, icon);
- accessGroup_ = new ArrayList<String>();
- }
-
- public List<String> getGroups()
- {
- return accessGroup_;
- }
-
- public PortalTemplateConfigOption addGroup(String accessGroup)
- {
- accessGroup_.add(accessGroup);
- return this;
- }
-}
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2012-01-11
15:55:00 UTC (rev 8290)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.exoplatform.portal.webui.portal;
+package org.exoplatform.portal.webui.portal;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
@@ -35,19 +35,14 @@
import org.exoplatform.portal.webui.workspace.UIMaskWorkspace;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
-import org.exoplatform.services.organization.Group;
-import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.resources.LocaleConfig;
import org.exoplatform.services.resources.LocaleConfigService;
import org.exoplatform.services.resources.ResourceBundleService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.config.InitParams;
-import org.exoplatform.webui.config.Param;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.config.annotation.ParamConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.core.model.SelectItemCategory;
@@ -78,13 +73,14 @@
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import java.util.Set;
@ComponentConfigs({
@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"system:/groovy/webui/form/UIFormTabPane.gtmpl", events = {
@EventConfig(listeners = UIPortalForm.SaveActionListener.class),
@EventConfig(listeners = UIMaskWorkspace.CloseActionListener.class, phase =
Phase.DECODE),
@EventConfig(listeners = UIPortalForm.CheckShowActionListener.class)}),
- @ComponentConfig(id = "CreatePortal", lifecycle = UIFormLifecycle.class,
template = "system:/groovy/webui/form/UIFormTabPane.gtmpl", initParams =
@ParamConfig(name = "PortalTemplateConfigOption", value =
"system:/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy"),
events = {
+ @ComponentConfig(id = "CreatePortal", lifecycle = UIFormLifecycle.class,
template = "system:/groovy/webui/form/UIFormTabPane.gtmpl", events = {
@EventConfig(name = "Save", listeners =
UIPortalForm.CreateActionListener.class),
@EventConfig(listeners = UIPortalForm.SelectItemOptionActionListener.class, phase =
Phase.DECODE),
@EventConfig(listeners = UIMaskWorkspace.CloseActionListener.class, phase =
Phase.DECODE)}),
@@ -110,14 +106,11 @@
private List<SelectItemOption<String>> languages = new
ArrayList<SelectItemOption<String>>();
- @SuppressWarnings("unchecked")
- public UIPortalForm(InitParams initParams) throws Exception
+ public void initPortalTemplateTab() throws Exception
{
- super("UIPortalForm");
UIFormInputItemSelector uiTemplateInput = new
UIFormInputItemSelector("PortalTemplate", null);
addUIFormInput(uiTemplateInput);
setSelectedTab(uiTemplateInput.getId());
- createDefaultItem();
UIFormInputSet uiPortalSetting = this.<UIFormInputSet>
getChildById("PortalSetting");
UIFormStringInput uiNameInput = uiPortalSetting.getUIStringInput(FIELD_NAME);
@@ -127,17 +120,19 @@
setActions(new String[]{"Save", "Close"});
- if (initParams == null)
+ UserPortalConfigService configService =
this.getApplicationComponent(UserPortalConfigService.class);
+ Set<String> portalTemplates = configService.getPortalTemplates();
+ for (String tempName : portalTemplates)
{
- return;
+ SelectItemCategory category = new SelectItemCategory(tempName);
+ PortalConfig config = configService.getPortalConfigFromTemplate(tempName);
+ if(config != null)
+ {
+ SelectItemOption<String> option = new
SelectItemOption<String>(config.getLabel(), tempName, config.getDescription(),
tempName);
+ category.addSelectItemOption(option);
+ uiTemplateInput.getItemCategories().add(category);
+ }
}
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
- Param param = initParams.getParam("PortalTemplateConfigOption");
- List<SelectItemCategory> portalTemplates =
(List<SelectItemCategory>)param.getMapGroovyObject(context);
- for (SelectItemCategory itemCategory : portalTemplates)
- {
- uiTemplateInput.getItemCategories().add(itemCategory);
- }
if (uiTemplateInput.getSelectedItemOption() == null)
{
uiTemplateInput.getItemCategories().get(0).setSelected(true);
@@ -149,7 +144,6 @@
super("UIPortalForm");
createDefaultItem();
setSelectedTab("PortalSetting");
-
}
public void setBindingBean() throws Exception
@@ -414,15 +408,6 @@
UIPortalForm uiForm = event.getSource();
UIFormInputItemSelector templateInput =
uiForm.getChild(UIFormInputItemSelector.class);
uiForm.setSelectedTab(templateInput.getId());
- PortalTemplateConfigOption selectItem =
-
(PortalTemplateConfigOption)templateInput.getSelectedCategory().getSelectItemOptions().get(0);
- List<String> groupIds = selectItem.getGroups();
- Group[] groups = new Group[groupIds.size()];
- OrganizationService service =
uiForm.getApplicationComponent(OrganizationService.class);
- for (int i = 0; i < groupIds.size(); i++)
- {
- groups[i] = service.getGroupHandler().findGroupById(groupIds.get(i));
- }
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm);
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2012-01-09
23:43:14 UTC (rev 8289)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2012-01-11
15:55:00 UTC (rev 8290)
@@ -248,6 +248,7 @@
}
UIMaskWorkspace uiMaskWS =
uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
UIPortalForm uiNewPortal = uiMaskWS.createUIComponent(UIPortalForm.class,
"CreatePortal", "UIPortalForm");
+ uiNewPortal.initPortalTemplateTab();
uiMaskWS.setUIComponent(uiNewPortal);
uiMaskWS.setShow(true);
prContext.addUIComponentToUpdateByAjax(uiMaskWS);
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7900,7906,7928,7938,8045,8053,8072
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7857,7877,7900,7906,7928,7938,8045,8053,8072