gatein SVN: r1511 - in portal/trunk/portlet: web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet and 1 other directory.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-02-03 03:12:15 -0500 (Wed, 03 Feb 2010)
New Revision: 1511
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIAdminToolbarPortlet.gtmpl
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIStarToolBarPortlet.gtmpl
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
portal/trunk/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css
Log:
GTNPORTAL-514;GTNPORTAL-515;GTNPORTAL-517
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIAdminToolbarPortlet.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIAdminToolbarPortlet.gtmpl 2010-02-03 08:03:06 UTC (rev 1510)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIAdminToolbarPortlet.gtmpl 2010-02-03 08:12:15 UTC (rev 1511)
@@ -31,14 +31,14 @@
}
String accountSetting = "javascript:if(document.getElementById('UIMaskWorkspace')) ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'AccountSettings', true));"
%>
-<div class="UIAdminToolbarPortlet" id="$uicomponent.id">
+<div class="UIAdminToolbarPortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
- <div class="TabsContainer" style="position: relative">
+ <div class="TabsContainer" >
<div class="UITab NormalToolbarTab">
<div class="">
<a class="EditorIcon TBIcon" href="#">$editorLabel</a>
</div>
- <div class="MenuItemContainer" style="position: absolute; display:none;">
+ <div class="MenuItemContainer" style="display:none;">
<div class="SubBlock">
<% if(userCouldEditNavigation){ %>
<div class="MenuItem">
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIStarToolBarPortlet.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIStarToolBarPortlet.gtmpl 2010-02-03 08:03:06 UTC (rev 1510)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIStarToolBarPortlet.gtmpl 2010-02-03 08:12:15 UTC (rev 1511)
@@ -10,12 +10,12 @@
String accountSetting = "if(document.getElementById('UIMaskWorkspace')) ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'AccountSettings', true));";
String changeSkinAction = "if(document.getElementById('UIMaskWorkspace')) ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'ChangeSkin', true));";
%>
-<div class="UIStarToolBarPortlet" id="$uicomponent.id">
+<div class="UIStarToolBarPortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
- <div class="TabsContainer" style="position: relative">
+ <div class="TabsContainer">
<div class="UITab" style="width: 62px">
<div class=""></div>
- <div class="MenuItemContainer" style="position: absolute; display:none;">
+ <div class="MenuItemContainer" style="display:none;">
<div class="MenuItem" onclick="$changeLanguageAction">
<a href="#" class="ChangeLanguageIcon"><%=_ctx.appRes("UIStarToolbarPortlet.item.ChangeLanguage")%></a>
</div>
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl 2010-02-03 08:03:06 UTC (rev 1510)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl 2010-02-03 08:12:15 UTC (rev 1511)
@@ -27,7 +27,7 @@
String clazz = "";
print """
- <div style="position: absolute; display:none" class="MenuItemContainer">
+ <div style="display:none" class="MenuItemContainer">
<div class="SubBlock">
""";
for(int i = 0; i < size; i++) {
@@ -71,7 +71,7 @@
""" ;
if(hasChild) {
print """
- <div class="MenuItemContainer" style="position: absolute; display:none">
+ <div class="MenuItemContainer">
<div class="SubBlock">
""" ;
for(int j = 0; j < node.getChildren().size(); j++) {
@@ -96,7 +96,7 @@
%>
<div class="UIUserToolBarDashboardPortlet" id="$uicomponent.id">
<div class="UIHorizontalTabs">
- <div class="TabsContainer" style="position: relative">
+ <div class="TabsContainer">
<div class="UITab NormalToolbarTab">
<div class="">
<a class="DashboardIcon TBIcon" href="<%= uicomponent.url("AddDefaultDashboard", defaultDashboardPage); %>">Dashboard</a>
@@ -109,9 +109,9 @@
}else{
defaultDashboardPage = currentUserNavigation.getNodes().get(0).getName();
%>
- <div class="UIUserToolBarDashboardPortlet" id="$uicomponent.id">
+ <div class="UIUserToolBarDashboardPortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
- <div class="TabsContainer" style="position: relative">
+ <div class="TabsContainer" >
<div class="UITab NormalToolbarTab">
<div class="">
<a class="DashboardIcon TBIcon" href="<%= portalURI + defaultDashboardPage %>">Dashboard</a>
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl 2010-02-03 08:03:06 UTC (rev 1510)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl 2010-02-03 08:12:15 UTC (rev 1511)
@@ -79,15 +79,15 @@
""" ;
}
%>
-<div class="UIUserToolBarGroupPortlet" id="$uicomponent.id">
+<div class="UIUserToolBarGroupPortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
- <div class="TabsContainer" style="position: relative">
+ <div class="TabsContainer">
<div class="UITab NormalToolbarTab">
<div class="">
<a class="GroupIcon TBIcon" href="<%= portalURI + "groupnavigation" %>">Group</a>
</div>
<% if (!groupNavigations.isEmpty()) { %>
- <div style="position: absolute; display:none" class="MenuItemContainer">
+ <div style="display:none" class="MenuItemContainer">
<% for(navigation in groupNavigations) {
renderGroupPageNavigation(navigation);
} %>
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2010-02-03 08:03:06 UTC (rev 1510)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2010-02-03 08:12:15 UTC (rev 1511)
@@ -114,9 +114,9 @@
}
%>
-<div class="UIUserToolBarSitePortlet" id="$uicomponent.id">
+<div class="UIUserToolBarSitePortlet" id="$uicomponent.id" >
<div class="UIHorizontalTabs">
- <div class="TabsContainer" style="position: relative">
+ <div class="TabsContainer">
<div class="UITab NormalToolbarTab">
<div class="">
<a class="SitesIcon TBIcon" href="<%= portalURI + "portalnavigation" %>">
Modified: portal/trunk/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css
===================================================================
--- portal/trunk/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css 2010-02-03 08:03:06 UTC (rev 1510)
+++ portal/trunk/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css 2010-02-03 08:12:15 UTC (rev 1511)
@@ -205,7 +205,7 @@
.UINavigationPortlet .MenuItemContainer {
white-space: nowrap;
- border: solid #b7b7b7 1px;
+ border: solid #b7b7b7 1px; /*fix for IE*/
text-align: left; /* orientation=lt */
text-align: right; /* orientation=rt */
}
14 years, 10 months
gatein SVN: r1510 - in portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry: impl and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-02-03 03:03:06 -0500 (Wed, 03 Feb 2010)
New Revision: 1510
Modified:
portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationCategoriesPlugins.java
portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
Log:
GTNPORTAL-551: Impossible to add Category or Application into Application Registry via extension mechanism
Modified: portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationCategoriesPlugins.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationCategoriesPlugins.java 2010-02-03 07:54:19 UTC (rev 1509)
+++ portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationCategoriesPlugins.java 2010-02-03 08:03:06 UTC (rev 1510)
@@ -52,8 +52,6 @@
{
if (configs == null)
return;
- if (pdcService_.getApplicationCategories().size() > 0)
- return;
for (Object ele : configs)
{
ApplicationCategory category = (ApplicationCategory)ele;
Modified: portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-02-03 07:54:19 UTC (rev 1509)
+++ portal/branches/3.0.0-Beta05-CP/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-02-03 08:03:06 UTC (rev 1510)
@@ -610,9 +610,12 @@
boolean save = false;
try
{
- for (ApplicationCategoriesPlugins plugin : plugins)
+ if (this.getApplicationCategories().size() < 1)
{
- plugin.run();
+ for (ApplicationCategoriesPlugins plugin : plugins)
+ {
+ plugin.run();
+ }
}
save = true;
}
14 years, 10 months
gatein SVN: r1509 - in portal/branches/3.0.0-Beta05-CP: component/web/src/main/java/org/exoplatform/web/resource/config/xml and 2 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-02-03 02:54:19 -0500 (Wed, 03 Feb 2010)
New Revision: 1509
Modified:
portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/AbstractTaskXMLBinding.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java
portal/branches/3.0.0-Beta05-CP/examples/extension/war/src/main/webapp/WEB-INF/gatein-resources.xml
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd
Log:
GTNPORTAL-520: Add overwrite option for skin in gatein-resources.xml
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/AbstractTaskXMLBinding.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/AbstractTaskXMLBinding.java 2010-02-03 07:46:46 UTC (rev 1508)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/AbstractTaskXMLBinding.java 2010-02-03 07:54:19 UTC (rev 1509)
@@ -55,7 +55,7 @@
bindingCSSPath(pTask, element);
bindingSkinName(pTask, element);
bindingModuleName(pTask, element);
-
+ bindingOverwrite(pTask, element);
return pTask;
}
@@ -91,6 +91,17 @@
String skinModule = nodes.item(0).getFirstChild().getNodeValue();
task.setModuleName(skinModule);
}
+
+ private void bindingOverwrite(PortalSkinTask task, Element element)
+ {
+ NodeList nodes = element.getElementsByTagName(GateinResource.OVERWRITE);
+ if (nodes == null || nodes.getLength() < 1)
+ {
+ return;
+ }
+ String overwrite = nodes.item(0).getFirstChild().getNodeValue();
+ task.setOverwrite("true".equals(overwrite));
+ }
}
@@ -150,6 +161,7 @@
bindingPortletName(pTask, element);
bindingCSSPath(pTask, element);
bindingSkinName(pTask, element);
+ bindingOverwrite(pTask, element);
return pTask;
}
@@ -196,6 +208,17 @@
String skinName = nodes.item(0).getFirstChild().getNodeValue();
task.setSkinName(skinName);
}
+
+ private void bindingOverwrite(PortletSkinTask task, Element element)
+ {
+ NodeList nodes = element.getElementsByTagName(GateinResource.OVERWRITE);
+ if (nodes == null || nodes.getLength() < 1)
+ {
+ return;
+ }
+ String overwrite = nodes.item(0).getFirstChild().getNodeValue();
+ task.setOverwrite("true".equals(overwrite));
+ }
}
public static class I18nTaskXMLBinding extends AbstractTaskXMLBinding
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java 2010-02-03 07:46:46 UTC (rev 1508)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java 2010-02-03 07:54:19 UTC (rev 1509)
@@ -29,7 +29,6 @@
*/
public interface GateinResource
{
-
final public static String SKIN_DEF_TAG = "skin-def";
final public static String SKIN_NAME_TAG = "skin-name";
@@ -62,5 +61,7 @@
final public static String JAVA_SCRIPT_PATH = "js-path";
+ final public static String OVERWRITE = "overwrite";
+
final public static String JAVA_SCRIPT_PRIORITY = "js-priority";
}
Modified: portal/branches/3.0.0-Beta05-CP/examples/extension/war/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/branches/3.0.0-Beta05-CP/examples/extension/war/src/main/webapp/WEB-INF/gatein-resources.xml 2010-02-03 07:46:46 UTC (rev 1508)
+++ portal/branches/3.0.0-Beta05-CP/examples/extension/war/src/main/webapp/WEB-INF/gatein-resources.xml 2010-02-03 07:54:19 UTC (rev 1509)
@@ -28,6 +28,7 @@
<application-name>web</application-name>
<portlet-name>HomePagePortlet</portlet-name>
<skin-name>Default</skin-name>
+ <overwrite>false</overwrite>
<css-path>/templates/skin/webui/component/UIHomePagePortlet/DefaultStylesheet.css</css-path>
</portlet-skin>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd 2010-02-03 07:46:46 UTC (rev 1508)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/gatein_resources_1_0.xsd 2010-02-03 07:54:19 UTC (rev 1509)
@@ -41,6 +41,7 @@
<xs:sequence>
<xs:element name="skin-name" type="xs:string" />
<xs:element name="css-path" type="xs:string" />
+ <xs:element name="overwrite" type="xs:string" />
</xs:sequence>
</xs:complexType>
@@ -50,6 +51,7 @@
<xs:element name="portlet-name" type="xs:string" />
<xs:element name="skin-name" type="xs:string" />
<xs:element name="css-path" type="xs:string" />
+ <xs:element name="overwrite" type="xs:string" />
</xs:sequence>
</xs:complexType>
14 years, 10 months
gatein SVN: r1508 - in portal/branches/3.0.0-Beta05-CP: component/web/src/main/java/org/exoplatform/web/resource/config/xml and 1 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-02-03 02:46:46 -0500 (Wed, 03 Feb 2010)
New Revision: 1508
Modified:
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigParser.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptKey.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java
portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java
portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
Log:
GTNPORTAL-541: Implement priority of Javascripts
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigParser.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigParser.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigParser.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -18,6 +18,11 @@
*/
package org.exoplatform.web.application.javascript;
+import org.exoplatform.web.resource.config.xml.GateinResource;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
@@ -26,11 +31,6 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
-import org.exoplatform.web.resource.config.xml.GateinResource;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
/**
* @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
* @version $Id$
@@ -100,7 +100,18 @@
param_ele.getElementsByTagName(GateinResource.JAVA_SCRIPT_MODULE).item(0).getFirstChild().getNodeValue();
String js_path =
param_ele.getElementsByTagName(GateinResource.JAVA_SCRIPT_PATH).item(0).getFirstChild().getNodeValue();
- task.addJSKey(js_module, js_path);
+ Integer js_priority = null;
+ try
+ {
+ js_priority =
+ Integer.valueOf(param_ele.getElementsByTagName(GateinResource.JAVA_SCRIPT_PRIORITY).item(0)
+ .getFirstChild().getNodeValue());
+ }
+ catch (Exception e)
+ {
+ //Js_priority still is null;
+ }
+ task.addJSKey(js_module, js_path, js_priority);
}
return task;
}
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -53,7 +53,7 @@
private JavascriptDeployer deployer;
private JavascriptRemoval removal;
-
+
/** Used to clear merged Javascript on undeploying an webapp */
private Map<String, List<String>> object_view_of_merged_JS;
@@ -91,23 +91,25 @@
availableScriptsPaths_.add(path);
extendedJavascripts.put(path, scriptData);
}
-
- public void addJavascript(JavascriptKey key, ServletContext scontext){
- addJavascript(key.getModule(), key.getScriptPath(), scontext);
+
+ public void addJavascript(JavascriptKey key, ServletContext scontext)
+ {
+ addJavascript(key.getModule(), key.getScriptPath(), key.getPriority(), scontext);
}
- public void addJavascript(String module, String scriptPath, ServletContext scontext)
+ public void addJavascript(String module, String scriptPath, Integer priority, ServletContext scontext)
{
String servletContextName = scontext.getServletContextName();
availableScripts_.add(module);
availableScriptsPaths_.add("/" + servletContextName + scriptPath);
-
+
List<String> mergedJS_list = object_view_of_merged_JS.get("/" + servletContextName);
- if(mergedJS_list == null){
+ if (mergedJS_list == null)
+ {
mergedJS_list = new ArrayList<String>();
object_view_of_merged_JS.put("/" + servletContextName, mergedJS_list);
}
-
+
StringBuffer sB = new StringBuffer();
String line = "";
try
@@ -137,23 +139,27 @@
}
sB.append("\n");
mergedJS_list.add("\n");
-
+
mergedJavascript = mergedJavascript.concat(sB.toString());
}
-
- public void removeJavascript(JavascriptKey key, ServletContext scontext){
+
+ public void removeJavascript(JavascriptKey key, ServletContext scontext)
+ {
String contextPath = scontext.getContextPath();
availableScripts_.remove(key.getModule());
availableScriptsPaths_.remove(contextPath + key.getScriptPath());
object_view_of_merged_JS.remove(contextPath);
}
-
+
/** Refresh the mergedJavascript **/
- public void refreshMergedJavascript(){
+ public void refreshMergedJavascript()
+ {
mergedJavascript = "";
StringBuffer buffer = new StringBuffer();
- for(String webApp : object_view_of_merged_JS.keySet()){
- for(String jsPath : object_view_of_merged_JS.get(webApp)){
+ for (String webApp : object_view_of_merged_JS.keySet())
+ {
+ for (String jsPath : object_view_of_merged_JS.get(webApp))
+ {
buffer.append(jsPath);
}
}
@@ -211,5 +217,5 @@
DefaultServletContainerFactory.getInstance().getServletContainer().removeWebAppListener(deployer);
DefaultServletContainerFactory.getInstance().getServletContainer().removeWebAppListener(removal);
}
-
+
}
\ No newline at end of file
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -43,7 +43,7 @@
{
private static final String GATEIN_CONFIG_RESOURCE = "/WEB-INF/gatein-resources.xml";
-
+
/**
* Logger
*/
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptKey.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptKey.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptKey.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -25,40 +25,56 @@
*/
public class JavascriptKey
{
-
+
private String module;
-
+
private String scriptPath;
-
- public JavascriptKey(String _module, String _scriptPath) throws IllegalArgumentException{
- if(_module == null || _scriptPath == null){
+
+ private int priority;
+
+ public JavascriptKey(String _module, String _scriptPath, Integer priority) throws IllegalArgumentException
+ {
+ if (_module == null || _scriptPath == null)
+ {
throw new IllegalArgumentException("Module and scriptPath are mandatory for JavascriptKey");
}
this.module = _module;
this.scriptPath = _scriptPath;
+ this.priority = (priority != null ? priority.intValue() : -1);
}
-
+
@Override
public boolean equals(Object obj)
{
- if(this == null || obj == null){
+ if (this == null || obj == null)
+ {
return this == null && obj == null;
}
-
- if(!(obj instanceof JavascriptKey)){
+
+ if (!(obj instanceof JavascriptKey))
+ {
return false;
- }else{
+ }
+ else
+ {
JavascriptKey target = (JavascriptKey)obj;
return module.equals(target.module) && scriptPath.equals(target.scriptPath);
}
-
+
}
-
- public String getModule(){
+
+ public String getModule()
+ {
return module;
}
-
- public String getScriptPath(){
+
+ public String getScriptPath()
+ {
return scriptPath;
}
+
+ public int getPriority()
+ {
+ return priority;
+ }
}
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -18,16 +18,16 @@
*/
package org.exoplatform.web.application.javascript;
-import java.util.List;
-
-import javax.servlet.ServletContext;
-
import org.gatein.wci.WebAppEvent;
import org.gatein.wci.WebAppLifeCycleEvent;
import org.gatein.wci.WebAppListener;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.picocontainer.Startable;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+
/**
* @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
* @version $Id$
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -19,6 +19,8 @@
package org.exoplatform.web.application.javascript;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import javax.servlet.ServletContext;
@@ -40,6 +42,20 @@
public void execute(JavascriptConfigService service, ServletContext scontext)
{
+ Collections.sort(jsKeys, new Comparator<JavascriptKey>()
+ {
+ public int compare(JavascriptKey js1, JavascriptKey js2)
+ {
+ if (js1.getPriority() == js2.getPriority())
+ return js1.getModule().compareTo(js2.getModule());
+ else if (js1.getPriority() < 0)
+ return 1;
+ else if (js2.getPriority() < 0)
+ return -1;
+ else
+ return js1.getPriority() - js2.getPriority();
+ }
+ });
for (JavascriptKey key : jsKeys)
{
service.addJavascript(key, scontext);
@@ -47,8 +63,8 @@
JavascriptDependentManager.addJavascriptDependent(scontext.getContextPath(), jsKeys);
}
- public void addJSKey(String moduleName, String scriptPath)
+ public void addJSKey(String moduleName, String scriptPath, Integer priority)
{
- jsKeys.add(new JavascriptKey(moduleName, scriptPath));
+ jsKeys.add(new JavascriptKey(moduleName, scriptPath, priority));
}
}
Modified: portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java 2010-02-03 07:46:46 UTC (rev 1508)
@@ -61,4 +61,6 @@
final public static String JAVA_SCRIPT_MODULE = "js-module";
final public static String JAVA_SCRIPT_PATH = "js-path";
+
+ final public static String JAVA_SCRIPT_PRIORITY = "js-priority";
}
Modified: portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2010-02-03 07:38:14 UTC (rev 1507)
+++ portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2010-02-03 07:46:46 UTC (rev 1508)
@@ -112,6 +112,7 @@
<param>
<js-module>eXo</js-module>
<js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
</param>
</javascript>
@@ -120,14 +121,17 @@
<param>
<js-module>eXo.core.Utils</js-module>
<js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>0</js-priority>
</param>
<param>
<js-module>eXo.core.DOMUtil</js-module>
<js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
</param>
<param>
<js-module>eXo.core.Browser</js-module>
<js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>1</js-priority>
</param>
<param>
<js-module>eXo.core.MouseEventManager</js-module>
14 years, 10 months
gatein SVN: r1507 - in portal/trunk: web/eXoResources/src/main/webapp/WEB-INF and 1 other directory.
by do-not-reply@jboss.org
Author: tan_pham_dinh
Date: 2010-02-03 02:38:14 -0500 (Wed, 03 Feb 2010)
New Revision: 1507
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java
portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
Log:
GTNPORTAL-541: Refactor ordering Javascript
Modified: portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2010-02-03 07:20:09 UTC (rev 1506)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2010-02-03 07:38:14 UTC (rev 1507)
@@ -28,11 +28,15 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStreamReader;
+import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.AbstractMap.SimpleEntry;
import javax.servlet.ServletContext;
@@ -43,6 +47,8 @@
private Collection<String> availableScriptsPaths_;
+ private List<AbstractMap.SimpleEntry<JavascriptKey, ServletContext>> availableScriptsKey_;
+
private String mergedJavascript = "";
private HashMap<String, String> extendedJavascripts;
@@ -61,6 +67,7 @@
{
availableScripts_ = new ArrayList<String>();
availableScriptsPaths_ = new ArrayList<String>();
+ availableScriptsKey_ = new ArrayList<AbstractMap.SimpleEntry<JavascriptKey, ServletContext>>();
extendedJavascripts = new HashMap<String, String>();
deployer = new JavascriptDeployer(context.getPortalContainerName(), this);
removal = new JavascriptRemoval(context.getPortalContainerName(), this);
@@ -75,11 +82,13 @@
*/
public Collection<String> getAvailableScripts()
{
+ serializeKeyPath();
return availableScripts_;
}
public Collection<String> getAvailableScriptsPaths()
{
+ serializeKeyPath();
return availableScriptsPaths_;
}
@@ -94,11 +103,43 @@
public void addJavascript(JavascriptKey key, ServletContext scontext)
{
- addJavascript(key.getModule(), key.getScriptPath(), key.getPriority(), scontext);
+ availableScriptsKey_.add(new SimpleEntry<JavascriptKey, ServletContext>(key, scontext));
}
- public void addJavascript(String module, String scriptPath, Integer priority, ServletContext scontext)
+ private void serializeKeyPath()
{
+ Collections.sort(availableScriptsKey_, new Comparator<SimpleEntry<JavascriptKey, ServletContext>>()
+ {
+ public int compare(SimpleEntry<JavascriptKey, ServletContext> entry1,
+ SimpleEntry<JavascriptKey, ServletContext> entry2)
+ {
+ JavascriptKey js1 = entry1.getKey();
+ JavascriptKey js2 = entry2.getKey();
+
+ if (js1.getPriority() == js2.getPriority())
+ return js1.getModule().compareTo(js2.getModule());
+ else if (js1.getPriority() < 0)
+ return 1;
+ else if (js2.getPriority() < 0)
+ return -1;
+ else
+ return js1.getPriority() - js2.getPriority();
+ }
+ });
+
+ availableScripts_.clear();
+ availableScriptsPaths_.clear();
+ mergedJavascript = "";
+
+ for (SimpleEntry<JavascriptKey, ServletContext> entry : availableScriptsKey_)
+ {
+ JavascriptKey key = entry.getKey();
+ addJavascript(key.getModule(), key.getScriptPath(), entry.getValue());
+ }
+ }
+
+ private void addJavascript(String module, String scriptPath, ServletContext scontext)
+ {
String servletContextName = scontext.getServletContextName();
availableScripts_.add(module);
availableScriptsPaths_.add("/" + servletContextName + scriptPath);
Modified: portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java 2010-02-03 07:20:09 UTC (rev 1506)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/application/javascript/JavascriptTask.java 2010-02-03 07:38:14 UTC (rev 1507)
@@ -19,8 +19,6 @@
package org.exoplatform.web.application.javascript;
import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
import java.util.List;
import javax.servlet.ServletContext;
@@ -42,20 +40,6 @@
public void execute(JavascriptConfigService service, ServletContext scontext)
{
- Collections.sort(jsKeys, new Comparator<JavascriptKey>()
- {
- public int compare(JavascriptKey js1, JavascriptKey js2)
- {
- if (js1.getPriority() == js2.getPriority())
- return js1.getModule().compareTo(js2.getModule());
- else if (js1.getPriority() < 0)
- return 1;
- else if (js2.getPriority() < 0)
- return -1;
- else
- return js1.getPriority() - js2.getPriority();
- }
- });
for (JavascriptKey key : jsKeys)
{
service.addJavascript(key, scontext);
Modified: portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2010-02-03 07:20:09 UTC (rev 1506)
+++ portal/trunk/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2010-02-03 07:38:14 UTC (rev 1507)
@@ -121,7 +121,7 @@
<param>
<js-module>eXo.core.Utils</js-module>
<js-path>/javascript/eXo/core/Util.js</js-path>
- <js-priority>0</js-priority>
+ <js-priority>1</js-priority>
</param>
<param>
<js-module>eXo.core.DOMUtil</js-module>
@@ -131,7 +131,7 @@
<param>
<js-module>eXo.core.Browser</js-module>
<js-path>/javascript/eXo/core/Browser.js</js-path>
- <js-priority>1</js-priority>
+ <js-priority>2</js-priority>
</param>
<param>
<js-module>eXo.core.MouseEventManager</js-module>
14 years, 10 months
gatein SVN: r1506 - in portal/branches/3.0.0-Beta05-CP/web: portal/src/main/webapp/WEB-INF/classes/locale/portal and 4 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-02-03 02:20:09 -0500 (Wed, 03 Feb 2010)
New Revision: 1506
Modified:
portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ko.xml
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPage.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBody.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UISiteBody.gtmpl
portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortal.gtmpl
Log:
GTNPORTAL-561: Remove useless code in HTML
Modified: portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-02-03 07:20:09 UTC (rev 1506)
@@ -18,33 +18,29 @@
*/
function UIComponent(node) {
+ if(!node) return null;
this.node = node ;
- if(node) this.type = node.className ;
- componentBlock = eXo.core.DOMUtil.findFirstDescendantByClass(node, "div", "UIComponentBlock");
- var children = eXo.core.DOMUtil.getChildrenByTagName(componentBlock, "div") ;
+ this.type = node.className ;
+ var DOMUtil = eXo.core.DOMUtil;
+ componentBlock = DOMUtil.findFirstDescendantByClass(node, "div", "UIComponentBlock");
+ var children = DOMUtil.getChildrenByTagName(componentBlock, "div") ;
for(var i=0; i<children.length; i++) {
- if(eXo.core.DOMUtil.hasClass(children[i], "META-DATA-BLOCK")) this.metaData = children[i];
- else if(eXo.core.DOMUtil.hasClass(children[i], "LAYOUT-BLOCK")) this.layout = children[i];
- else if(eXo.core.DOMUtil.hasClass(children[i], "VIEW-BLOCK")) this.view = children[i];
- else if(eXo.core.DOMUtil.hasClass(children[i], "EDITION-BLOCK")) this.control = children[i];
+ if(DOMUtil.hasClass(children[i], "LAYOUT-BLOCK")) this.layout = children[i];
+ else if(DOMUtil.hasClass(children[i], "VIEW-BLOCK")) this.view = children[i];
+ else if(DOMUtil.hasClass(children[i], "EDITION-BLOCK")) this.control = children[i];
}
this.component = "";
- var div = eXo.core.DOMUtil.getChildrenByTagName(this.metaData, "div");
- if(div.length > 0) {
- this.id = div[0].firstChild.nodeValue ;
- this.title = div[1].firstChild.nodeValue ;
- }
- //minh.js.exo
- //bug PORTAL-1161.
- //this.description = div[2].firstChild.nodeValue ;
+ if(DOMUtil.hasClass(node, "UIPortal")) this.id = node.id.replace("UIPortal-", "");
+ else if(DOMUtil.hasClass(node, "UIPortlet")) this.id = node.id.replace("UIPortlet-", "");
+ else if(DOMUtil.hasClass(node, "UIContainer")) this.id = node.id.replace("UIContainer-", "");
+ else this.id = node.id;
+
};
-//UIComponent.prototype.getDescription = function() { return this.description ; };
UIComponent.prototype.getId = function() { return this.id ; };
-UIComponent.prototype.getTitle = function() { return this.title ; };
UIComponent.prototype.getElement = function() { return this.node ; };
UIComponent.prototype.getUIComponentType = function() { return this.type ; };
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ar.xml 2010-02-03 07:20:09 UTC (rev 1506)
@@ -1332,9 +1332,6 @@
-->
<UIPortlet>
<label>
- <portlet>مدخل</portlet>
- <title>مدخل</title>
- <description>مدخل إكزو</description>
<portletContent>وصف المدخل</portletContent>
<View>عرض</View>
</label>
@@ -1671,9 +1668,6 @@
<Container>الحاويات</Container>
<DragControlArea>هذا المجال لجر هذه الحاوية</DragControlArea>
</title>
- <label>
- <Thecontainer>الحاوية</Thecontainer>
- </label>
<deleteContainer>هل أنت متأكد من حذف هذه الحاوية؟</deleteContainer>
<tooltip>
<closeContainer>إغلاق الحاوية</closeContainer>
@@ -1688,8 +1682,6 @@
-->
<UIPage>
<label>
- <title>صفحة البوابة</title>
- <description>صفحة البوابة</description>
<pageContent>وصف الصفحة</pageContent>
</label>
<msg>
@@ -1754,10 +1746,6 @@
############################################################################
-->
<UIPageBody>
- <label>
- <title>صفحة البوابة</title>
- <description>صفحة البوابة</description>
- </label>
<msg>
<pageNotFoundLine1>!لم يتم العثور على الصفحة</pageNotFoundLine1>
<pageNotFoundLine2>ليس لديك الحق في مشاهدة هذه الصفحة</pageNotFoundLine2>
@@ -1766,29 +1754,6 @@
</msg>
</UIPageBody>
<!--
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
- -->
- <UIPortal>
- <label>
- <title>حاوية واجهة مستخدم البوابة</title>
- <description>حاوية واجهة مستخدم البوابة</description>
- </label>
- </UIPortal>
- <!--
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
- -->
- <UITableColumnContainer>
- <label>
- <title>حاوية التصفح</title>
- <description>حاوية التصفح</description>
- </label>
- </UITableColumnContainer>
-
- <!--
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -770,9 +770,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Portlet
-UIPortlet.label.title=Portlet
-UIPortlet.label.description=GateIn portlet
UIPortlet.label.portletContent=Portlet Description
UIPortlet.label.View=View
UIPortlet.lable.information=Done
@@ -976,7 +973,6 @@
UIContainer.title.Container=Container
UIContainer.title.DragControlArea=Hold this area to drag this container
-UIContainer.label.Thecontainer=The container
UIContainer.deleteContainer=Are you sure you want to delete this Container?
UIContainer.tooltip.closeContainer=Delete Container
UIContainer.tooltip.editContainer=Edit Container
@@ -986,8 +982,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=Portal Page
-UIPage.label.description=The page body of the portal
UIPage.label.pageContent=Page Description
UIPage.msg.EditPermission.null=You do not have the rights to edit this page.
@@ -1022,27 +1016,12 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Portal Page Body
UIPageBody.label.description=The page body of the portal
UIPageBody.msg.pageNotFoundLine1=Page not found.
UIPageBody.msg.pageNotFoundLine2=You do not have permission to view this page.
UIPageBody.msg.pageNotFoundLine3=Page can be deleted.
UIPageBody.msg.pageNotFoundLine4=This node does not have any pages.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=UIPortal Container
-UIPortal.label.description=The UIPortal Container
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Navigation Container
-UITableColumnContainer.label.description=The navigation container
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_es.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -768,9 +768,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Portlet
-UIPortlet.label.title=Portlet
-UIPortlet.label.description=Portlet eXo Platform
UIPortlet.label.portletContent=Descripci\u00f3n del Portlet
UIPortlet.label.View=Ver
UIPortlet.lable.information=Hecho
@@ -974,7 +971,6 @@
UIContainer.title.Container=Contenedor
UIContainer.title.DragControlArea=Manten este \u00e1rea para arrastrar este contenedor
-UIContainer.label.Thecontainer=El contenedor
UIContainer.deleteContainer=\u00bfEst\u00e1s seguro de que deseas borrar este Contenedor?
UIContainer.tooltip.closeContainer=Borrar Contenedor
UIContainer.tooltip.editContainer=Editar Contenedor
@@ -984,8 +980,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=P\u00e1gina del Portal
-UIPage.label.description=El cuerpo de la p\u00e1gina del portal
UIPage.label.pageContent=Descripci\u00f3n de la P\u00e1gina
UIPage.msg.EditPermission.null=No tienes permisos para editar esta p\u00e1gina.
@@ -1020,27 +1014,11 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Cuerpo de la P\u00e1gina del Portal
-UIPageBody.label.description=El Cuerpo de la P\u00e1gina del Portal
UIPageBody.msg.pageNotFoundLine1=P\u00e1gina no encontrada.
UIPageBody.msg.pageNotFoundLine2=No tienes permisos para ver esta P\u00e1gina.
UIPageBody.msg.pageNotFoundLine3=La P\u00e1gina no puede ser borrada.
UIPageBody.msg.pageNotFoundLine4=Este nodo no tiene ninguna P\u00e1gina.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=Contenedor UIPortal
-UIPortal.label.description=El Contenedor UIPortal
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Contenedor de Navegaci\u00f3n
-UITableColumnContainer.label.description=El Contenedor de Navegaci\u00f3n
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -753,9 +753,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Portlet
-UIPortlet.label.title=Portlet
-UIPortlet.label.description=Portlets eXo Platform
UIPortlet.label.portletContent=Description de portlet
UIPortlet.label.View=Visualiser
UIPortlet.lable.information=Terminé
@@ -959,7 +956,6 @@
UIContainer.title.Container=Conteneur
UIContainer.title.DragControlArea=Cliquer sur cette partie sans relâcher le bouton pour faire glisser ce conteneur
-UIContainer.label.Thecontainer=Le conteneur
UIContainer.deleteContainer=Confirmez-vous la suppression de ce conteneur?
UIContainer.tooltip.closeContainer=Fermer le conteneur
UIContainer.tooltip.editContainer=Editer le conteneur
@@ -969,8 +965,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=Page du portail
-UIPage.label.description=La page du portail
UIPage.label.pageContent=Description de la page
UIPage.msg.EditPermission.null=Vous n'avez pas le droit d'éditer cette page !
@@ -1005,27 +999,11 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Page principale du portail
-UIPageBody.label.description=La page principale du portail
UIPageBody.msg.pageNotFoundLine1=Page non trouvée!
UIPageBody.msg.pageNotFoundLine2=Vous n'avez pas les droits suffisants pour voir cette page.
UIPageBody.msg.pageNotFoundLine3=Page supprimée!
UIPageBody.msg.pageNotFoundLine4=This node does not have any pages.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=Conteneur UIPortal
-UIPortal.label.description=Le conteneur UIPortal
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Conteneur de navigation
-UITableColumnContainer.label.description=Conteneur de navigation
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_it.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -769,9 +769,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Portlet
-UIPortlet.label.title=Portlet
-UIPortlet.label.description=Portlet di GateIn
UIPortlet.label.portletContent=Descrizione della Portlet
UIPortlet.label.View=Visualizza
UIPortlet.lable.information=Fatto
@@ -975,7 +972,6 @@
UIContainer.title.Container=Contenitore
UIContainer.title.DragControlArea=Mantieni quest'area per copiare il Contenitore
-UIContainer.label.Thecontainer=Il contenitore
UIContainer.deleteContainer=Sicuro di voler eliminare questo contenitore?
UIContainer.tooltip.closeContainer=Elimina il Contenitore
UIContainer.tooltip.editContainer=Modifica il Contenitore
@@ -985,8 +981,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=Pagina del Portale
-UIPage.label.description=Il corpo della pagina del portale
UIPage.label.pageContent=Descrizione della Pagina
UIPage.msg.EditPermission.null=Non hai i permessi per modificare la pagina.
@@ -1021,27 +1015,11 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Corpo della Pagina del Portale
-UIPageBody.label.description=Il corpo della pagina del portale
UIPageBody.msg.pageNotFoundLine1=Pagina non trovata.
UIPageBody.msg.pageNotFoundLine2=Non hai i permessi per visualizzare la pagina.
UIPageBody.msg.pageNotFoundLine3=La pagina pu\u00F2 essere eliminata.
UIPageBody.msg.pageNotFoundLine4=Questo nodo non ha pagine.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=Contenitore UIPortal
-UIPortal.label.description=Il Contenitore UIPortal
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Contenitore della Navigazione
-UITableColumnContainer.label.description=Il Contenitore della Navigazione
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ko.xml
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ko.xml 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ko.xml 2010-02-03 07:20:09 UTC (rev 1506)
@@ -1186,9 +1186,6 @@
</UIDecoratorConfigOptions>
<UIPortlet>
<label>
- <portlet>포틀릿</portlet>
- <title>포틀릿</title>
- <description>GateIn 포틀릿</description>
<portletContent>포틀릿 설명</portletContent>
<View>보기</View>
</label>
@@ -1460,9 +1457,6 @@
<Container>컨테이너</Container>
<DragControlArea>컨테이너에 드래그하는 영역 유지</DragControlArea>
</title>
- <label>
- <Thecontainer>컨테이너</Thecontainer>
- </label>
<deleteContainer>이 컨테이너를 삭제하시겠습니까?</deleteContainer>
<tooltip>
<closeContainer>컨테이너 삭제</closeContainer>
@@ -1472,8 +1466,6 @@
</UIContainer>
<UIPage>
<label>
- <title>포탈 페이지</title>
- <description>포탈 페이지 설명</description>
<pageContent>페이지 설명</pageContent>
</label>
<msg>
@@ -1532,10 +1524,6 @@
<!-- # org.exoplatform.portal.component.view.UIPageBody #-->
<!-- ############################################################################-->
<UIPageBody>
- <label>
- <title>포탈 페이지 몸체</title>
- <description>포탈의 페이지 몸체</description>
- </label>
<msg>
<pageNotFoundLine1>페이지를 찾을 수 없습니다.</pageNotFoundLine1>
<pageNotFoundLine2>이 페이지를 볼 수 있는 권한이 없습니다.</pageNotFoundLine2>
@@ -1543,24 +1531,6 @@
<pageNotFoundLine4>이 노드에 페이지가 존재하지 않습니다.</pageNotFoundLine4>
</msg>
</UIPageBody>
-<!-- ############################################################################-->
-<!-- # org.exoplatform.portal.component.view.UIPortal #-->
-<!-- ############################################################################-->
- <UIPortal>
- <label>
- <title>UIPortal 컨테이너</title>
- <description>UIPortal 컨테이너</description>
- </label>
- </UIPortal>
- <UITableColumnContainer>
- <label>
- <title>내비게이션 컨테이너</title>
- <description>내비게이션 컨테이너</description>
- </label>
- </UITableColumnContainer>
-<!-- ############################################################################-->
-<!-- # org.exoplatform.portal.component.view.UITableColumnContainer#-->
-<!-- ############################################################################-->
<UISearch>
<label>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_ru.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -758,9 +758,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Портлет
-UIPortlet.label.title=Портлет
-UIPortlet.label.description=eXo Platform портлет
UIPortlet.label.portletContent=Описание портлета
UIPortlet.label.View=Показать
UIPortlet.lable.information=Готово
@@ -964,7 +961,6 @@
UIContainer.title.Container=Контейнер
UIContainer.title.DragControlArea=Зажмите здесь для перетаскивания контейнера
-UIContainer.label.Thecontainer=Контейнер
UIContainer.deleteContainer=Вы действительно хотите удалить контейнер?
UIContainer.tooltip.closeContainer=Удалить контейнер
UIContainer.tooltip.editContainer=Изменить контейнер
@@ -974,8 +970,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=Страница портала
-UIPage.label.description=Описание странице
UIPage.label.pageContent=Содержимое страницы
UIPage.msg.EditPermission.null=У Вас нету прав для редактирования страницы.
@@ -1010,27 +1004,11 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Тело страницы портала
-UIPageBody.label.description=Тело страницы портала
UIPageBody.msg.pageNotFoundLine1=Страница не найдена.
UIPageBody.msg.pageNotFoundLine2=У Вас нету прав для просмотра страницы.
UIPageBody.msg.pageNotFoundLine3=Страница может быть удалена.
UIPageBody.msg.pageNotFoundLine4=Узел не содержит страниц.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=Контейнер интерфейса портала
-UIPortal.label.description=Контейнер интерфейса портала
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Контейнер навигации
-UITableColumnContainer.label.description=Контейнер навигации
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_uk.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -749,9 +749,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Портлет
-UIPortlet.label.title=Портлет
-UIPortlet.label.description=eXo Platform портлет
UIPortlet.label.portletContent=Опис портлету
UIPortlet.label.View=Перегляд
UIPortlet.lable.information=Виконано
@@ -955,7 +952,6 @@
UIContainer.title.Container=Контейнер
UIContainer.title.DragControlArea=Перетягніть в цю область контейнер
-UIContainer.label.Thecontainer=Контейнер
UIContainer.deleteContainer=Ви впевнені, що бажаєте видалити цей контейнер?
UIContainer.tooltip.closeContainer=Видалити контейнер
UIContainer.tooltip.editContainer=Редагувати контейнер
@@ -965,8 +961,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=Сторінка порталу
-UIPage.label.description=Тіло сторінки порталу
UIPage.label.pageContent=Опис сторінки
UIPage.msg.EditPermission.null=У Вас немає прав, щоб редагувати цю сторінку.
@@ -1001,27 +995,11 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Тіло сторінки порталу
-UIPageBody.label.description=Тіло сторінки порталу
UIPageBody.msg.pageNotFoundLine1=Сторінка не знайдена.
UIPageBody.msg.pageNotFoundLine2=У Вас немає прав для перегляду цієї сторінки.
UIPageBody.msg.pageNotFoundLine3=Сторінка може бути видалена.
UIPageBody.msg.pageNotFoundLine4=Цей вузол немає сторінок.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=UIПортал Контейнер
-UIPortal.label.description=UIПортал Контейнер
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Навігаційний контейнер
-UITableColumnContainer.label.description=Навігаційний контейнер
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2010-02-03 07:20:09 UTC (rev 1506)
@@ -749,9 +749,6 @@
#############################################################################
#############################################################################
-UIPortlet.label.portlet=Portlet
-UIPortlet.label.title=Portlet
-UIPortlet.label.description=eXo Platform Portlet
UIPortlet.label.portletContent=Mô tả Portlet
UIPortlet.label.View=Xem
UIPortlet.lable.information=Thực hiện
@@ -953,7 +950,6 @@
UIContainer.title.Container=Container
UIContainer.title.DragControlArea=Giữ vùng này để kéo Container.
-UIContainer.label.Thecontainer=Container
UIContainer.deleteContainer=Bạn có chắc chắn muốn xóa Container này không?
UIContainer.tooltip.closeContainer=Đóng Container
UIContainer.tooltip.editContainer=Sửa Container
@@ -963,8 +959,6 @@
# org.exoplatform.portal.component.view.UIPage #
############################################################################
-UIPage.label.title=Portal Page
-UIPage.label.description=Phần thân của trang Portal.
UIPage.label.pageContent=Vùng chứa nội dung của trang.
UIPage.msg.EditPermission.null=Bạn không được quyền chỉnh sửa trang này!
@@ -999,27 +993,11 @@
# org.exoplatform.portal.component.view.UIPageBody #
############################################################################
-UIPageBody.label.title=Phần thân của trang Portal
-UIPageBody.label.description=Phần thân của trang Portal
UIPageBody.msg.pageNotFoundLine1=Không tìm thấy trang nào!
UIPageBody.msg.pageNotFoundLine2=Bạn không được quyền được xem trang này!
UIPageBody.msg.pageNotFoundLine3=Trang này có thể được xóa!
UIPageBody.msg.pageNotFoundLine4=Node này không có bất kỳ trang web nào.
- ############################################################################
- # org.exoplatform.portal.component.view.UIPortal #
- ############################################################################
-
-UIPortal.label.title=UIPortal Container
-UIPortal.label.description=UIPortal Container
-
- ############################################################################
- # org.exoplatform.portal.component.view.UITableColumnContainer#
- ############################################################################
-
-UITableColumnContainer.label.title=Navigation Container
-UITableColumnContainer.label.description=Navigation Container
-
###############################################################################
# org.exoplatform.portal.webui.component.UISearchForm #
###############################################################################
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -26,18 +26,6 @@
style="top: 0px; left:0px;">
<div class="UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id"><%=uicomponent.getId();%></div>
- <div class="title"><%=_ctx.appRes("UIPortlet.label.title");%></div>
- <div class="description">
- <%if(uicomponent.getDescription() != null) {%>
- <%=uicomponent.getDescription();%>
- <%} else {%>
- <%=_ctx.appRes("UIPortlet.label.description");%>
- <%}%>
- </div>
- </div>
-
<%if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == uiPortalApp.APP_BLOCK_EDIT_MODE) { %>
<div class="LAYOUT-BLOCK LAYOUT-PORTLET">
<div class="PortletLayoutDecorator">
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIContainer.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -29,12 +29,6 @@
<div class="LeftContainerBlock">
<div class="RightContainerBlock UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UIContainer.title.Container")%></div>
- <div class="description"><%=_ctx.appRes("UIContainer.label.Thecontainer")%></div>
- </div>
-
<%
int portalMode = uiPortalApp.getModeState();
if(portalMode == uiPortalApp.CONTAINER_BLOCK_EDIT_MODE || portalMode == uiPortalApp.APP_BLOCK_EDIT_MODE){
@@ -48,9 +42,11 @@
</div>
</div>
+ <%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;">
<div style="position: relative;">
<div style="position: absolute; top: -86px;">
+
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
<div class="CONTROL-CONTAINER CONTROL-BLOCK" style="position: absolute; top: -6px;">
<%/*Begin InfoBar*/%>
@@ -85,6 +81,7 @@
</div>
</div>
</div>
+ <%} %>
</div>
</div>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -20,14 +20,6 @@
<div class="LeftContainerBlock">
<div class="RightContainerBlock UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UITableColumnContainer.label.title")%></div>
- <div class="description"><%=_ctx.appRes("UITableColumnContainer.label.description")%></div>
- </div>
-
-
-
<%
int portalMode = uiPortalApp.getModeState();
String style = "";
@@ -53,9 +45,11 @@
</div>
<%/*Debug On IE -----For DND */%>
+ <%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;">
<div style="position: relative;">
<div style="position: absolute; top: -86px;">
+
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
<div class="CONTROL-CONTAINER CONTROL-BLOCK" style="position: absolute; top: -6px;">
<%/*Begin InfoBar*/%>
@@ -91,6 +85,7 @@
</div>
</div>
</div>
+ <%} %>
</div>
</div>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/container/UIToolbarContainer.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -16,13 +16,6 @@
<div class="LeftContainerBlock">
<div class="RightContainerBlock UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UITableColumnContainer.label.title")%></div>
- <div class="description"><%=_ctx.appRes("UITableColumnContainer.label.description")%></div>
- </div>
-
-
<%
int portalMode = uiPortalApp.getModeState();
String style = "";
@@ -49,9 +42,11 @@
</div>
<%/*Debug On IE -----For DND */%>
+ <%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<div class="EDITION-BLOCK EDITION-CONTAINER" style="display: none;">
<div style="position: relative;">
<div style="position: absolute; top: -86px;">
+
<div class="NewLayer" style="display: none; visibility: hidden;"><span></span></div>
<div class="CONTROL-CONTAINER CONTROL-BLOCK" style="position: absolute; top: -6px;">
<%/*Begin InfoBar*/%>
@@ -87,6 +82,7 @@
</div>
</div>
</div>
+ <%} %>
</div>
</div>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPage.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPage.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPage.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -5,11 +5,6 @@
<div class="UIPage" id="UIPage-${uicomponent.id}">
<div class="UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UIPage.label.title")%></div>
- <div class="description"><%=_ctx.appRes("UIPage.label.description")%></div>
- </div>
<div class="VIEW-PAGE">
<div id="UIPage">
<div class="UIRowContainer">
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBody.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBody.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBody.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -5,11 +5,6 @@
%>
<div class="UIPageBody" id="${uicomponent.id}">
<div class="UIComponent UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UIPage.label.title")%></div>
- <div class="description"><%=_ctx.appRes("UIPage.label.description")%></div>
- </div>
<%if(portalMode == UIPortalApplication.APP_BLOCK_EDIT_MODE || portalMode == UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE) {%>
<div class="LAYOUT-BLOCK LAYOUT-PAGEBODY DragControlArea" onmousedown="eXo.portal.PortalDragDrop.init.call(this, event);">
@@ -79,9 +74,11 @@
</div>
</div>
<%}%>
+ <%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<div class="EDITION-BLOCK EDITION-PAGEBODY" style="position:relative">
<div class="UIPageBodyMask" style="position:absolute; display:none;" onmousedown="eXo.portal.PortalDragDrop.init.call(this, event);"><span></span></div>
<div class="CONTROL-PAGEBODY CONTROL-BLOCK" style="display: none"><span></span></div>
</div>
+ <%} %>
</div>
</div>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UISiteBody.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UISiteBody.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/page/UISiteBody.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -5,11 +5,6 @@
%>
<div class="UISiteBody" id="${uicomponent.id}">
<div class="UIComponent UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UIPage.label.title")%></div>
- <div class="description"><%=_ctx.appRes("UIPage.label.description")%></div>
- </div>
<%if(portalMode == UIPortalApplication.APP_BLOCK_EDIT_MODE || portalMode == UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE) {%>
<div class="LAYOUT-BLOCK LAYOUT-SITEBODY DragControlArea">
@@ -74,9 +69,11 @@
<% } else { uicomponent.renderChildren(); } %>
</div>
<%}%>
+ <%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<div class="EDITION-BLOCK EDITION-SITEBODY">
<div class="CONTROL-SITEBODY CONTROL-BLOCK" style="display: none"><span></span></div>
</div>
<div class="UISiteBodyMask" style="position:absolute; display:none;"><span></span></div>
+ <%} %>
</div>
</div>
Modified: portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortal.gtmpl
===================================================================
--- portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortal.gtmpl 2010-02-03 06:59:13 UTC (rev 1505)
+++ portal/branches/3.0.0-Beta05-CP/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortal.gtmpl 2010-02-03 07:20:09 UTC (rev 1506)
@@ -1,25 +1,30 @@
<%
+ import org.exoplatform.portal.webui.workspace.UIPortalApplication;
def rcontext = _ctx.getRequestContext();
rcontext.getJavascriptManager().importJavascript('eXo.portal.PortalDragDrop');
+ int portalMode = _ctx.getRequestContext().getUIApplication().getModeState();
%>
<div class="UIPortal" id="UIPortal-$uicomponent.id">
<div class="UIComponentBlock">
- <div class="META-DATA-BLOCK" style="display: none">
- <div class="id">$uicomponent.id</div>
- <div class="title"><%=_ctx.appRes("UIPortal.label.title")%></div>
- <div class="description"><%=_ctx.appRes("UIPortal.label.description")%></div>
- </div>
- <div class="LAYOUT-PORTAL LAYOUT-BLOCK" style="display: none;"></div>
+
+ <%if(portalMode == UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE || portalMode == UIPortalApplication.APP_BLOCK_EDIT_MODE) { %>
+ <div class="LAYOUT-PORTAL LAYOUT-BLOCK">
+ <%} else {%>
<div class="VIEW-PORTAL VIEW-BLOCK">
+ <%} %>
<div id="$uicomponent.id">
<div class="UIRowContainer">
<%uicomponent.renderChildren();%>
</div>
</div>
</div>
+
+ <%if(portalMode != UIPortalApplication.NORMAL_MODE){%>
<div class="EDITION-BLOCK EDITION-PORTAL" style="display: none;">
<div class="CONTROL-PORTAL CONTROL-BLOCK"><span></span></div>
</div>
+ <%} %>
+
</div>
</div>
\ No newline at end of file
14 years, 10 months
gatein SVN: r1505 - portal/trunk/docs/reference-guide/en/modules/portlets.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-02-03 01:59:13 -0500 (Wed, 03 Feb 2010)
New Revision: 1505
Modified:
portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml
Log:
Edits to Chapter 4
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-02-03 04:35:37 UTC (rev 1504)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-02-03 06:59:13 UTC (rev 1505)
@@ -5,38 +5,32 @@
]>
<section id="sect-Reference_Guide-Groovy_Templates">
<title>Groovy Templates</title>
- <section id="sect-Reference_Guide-Groovy_Templates-Overview">
- <title>Overview</title>
<para>
- This article gives a glance at the Groovy language, and explains how to configure the portlet and and the groovy template.
+ In addition to the content in this chapter, refer also to <xref linkend="sect-Reference_Guide-AJAX_Framework" /> in order to better understand the communication between the Groovy Template and the portlet.
</para>
- <para>
- It's recommended to read also <xref linkend="sect-Reference_Guide-AJAX_Framework" /> in order to understand better the communication between the Groovy Template and the portlet.
- </para>
- </section>
<section id="sect-Reference_Guide-Groovy_Templates-Basic_structure">
<title>Basic structure</title>
<para>
- The structure of a template is very easy :
+ The structure of a template is quite simple. It consists of only two elements:
</para>
- <itemizedlist>
+ <orderedlist>
<listitem>
<para>
- The HTML code
+ The HTML code and;
</para>
</listitem>
<listitem>
<para>
- zero or more groovy language code blocks, enclosed by <% ... %>
+ zero or more groovy language code blocks, enclosed by <% ... %> enclosures.
</para>
</listitem>
- </itemizedlist>
+ </orderedlist>
<para>
- The HTML code in the template doesn't have to contain the <literal>html</literal> , or <literal>body</literal> tags. Hence, you can use a groovy template for a component that will be rendered in another component.
+ The HTML code in the template doesn't have to contain the <literal>html</literal>, or <literal>body</literal> tags. This allows groovy templates for one component to also be rendered in another component.
</para>
<para>
- Example :
+ For example:
</para>
<programlisting role="HTML"><!DOCTYPE html
@@ -57,25 +51,27 @@
<section id="sect-Reference_Guide-Groovy_Templates-Groovy_language">
<title>Groovy language</title>
<para>
- Groovy is a scripting language for Java. Here are a few examples on how to use it, but you can find more information in <ulink url="http://groovy.codehaus.org/Documentation">the full documentation</ulink> .
+ Groovy is a scripting language for Java. Some usage examples are included in this section, however further information is available at <ulink url="http://groovy.codehaus.org/Documentation"></ulink> .
</para>
- <para>
- This language looks like Java a lot, so it's very easy to use. Examples :
- </para>
- <para>
- Variables definition :
- </para>
-
+ <variablelist>
+ <title>Some examples of Groovy</title>
+ <varlistentry>
+ <term>Variables definition</term>
+ <listitem>
+ <para>
<programlisting>int min = 1;
def totalPage = uicomponent.getAvailablePage();
String name = "uiPortlet";
categories = uicomponent.getItemCategories();
String columns = uicomponent.getColumns();
</programlisting>
- <para>
- Other expressions :
- </para>
-
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Other expressions</term>
+ <listitem>
+ <para>
<programlisting>for(category in categories) { ... }
for(i in min..max) { ... } // min and max are int variables
println "</div>" ;
@@ -86,18 +82,31 @@
<%=uicomponent.getToolbarStyle();%> // <%= to avoid a call of println method
import org.exoplatform.portal.config.model.PageNode;
</programlisting>
+
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
</section>
<section id="sect-Reference_Guide-Groovy_Templates-Linking_a_portlet_with_a_template">
<title>Linking a portlet with a template</title>
+
<section id="sect-Reference_Guide-Linking_a_portlet_with_a_template-Portlet_configuration">
<title>Portlet configuration</title>
<para>
- The configuration of a portlet is partly made with <literal>ComponentConfig</literal> annotations (others are ComponentConfigs, EventConfig, etc). One of the parameters of this annotation is called <literal>template</literal>, where you can define the path to the template file associated with this portlet.
+ The configuration of a portlet is partly made with <literal>ComponentConfig</literal> annotations (others are <literal>ComponentConfigs</literal>, <literal>EventConfig</literal>, etc).
</para>
<para>
- To specify this parameter to your portlet, just add this statement to your configuration annotation, for example in <emphasis role="bold">src:/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/ </emphasis> you find <emphasis role="bold">UIApplicationForm.java</emphasis> :
+ One of the parameters of this annotation is <literal>template</literal>. This is where the path to the template file associated with this portlet is defined.
</para>
+ <para>
+ To specify this parameter, add this statement to the configuration annotation.
+ </para>
+ <para>
+ For example, in <emphasis role="bold">src:/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/ </emphasis> is the <emphasis role="bold">UIApplicationForm.java</emphasis> file:
+ </para>
<programlisting>@ComponentConfig(
lifecycle = UIFormLifecycle.class,
@@ -109,28 +118,64 @@
)
</programlisting>
<para>
- You see that the path is in the namespace called "system", "system" is a reference to the portal webapp. In this webapp you find some reusable groovy templates, just open the folder <emphasis role="bold">src:/web/portal/src/main/webapp/groovy/webui/form/ </emphasis> to see them.
+ The path is in the "<literal>system</literal>" namespace. This is a reference to the portal webapp.
</para>
<para>
- As you want to create your own template, create a groovy file in your webbapp and refer to it. Please use the namespace "app" for refering to the same webapp as your component. GateIn always puts the component templates in a folder like "/webapp/groovy/<literal>your_portlet_name</literal>/webui/component".
+ This webapp contains reusable groovy templates in the folder; <emphasis role="bold">src:/web/portal/src/main/webapp/groovy/webui/form/ </emphasis>.
</para>
-
+ <para>
+ Use the following steps to create a new template;
+ </para>
+ <procedure>
+ <step>
+ <para>
+ Create a groovy file in the appropriate webbapp and refer to it.
+ </para>
+ </step>
+ <step>
+ <para>
+ Use the namespace "app" for refering to the same webapp as the component.
+ </para>
+ </step>
+ <step>
+ <para>
+ &PRODUCT; stores the component templates in a folder that follows this placement convention: "<filename>/webapp/groovy/<literal>your_portlet_name</literal>/webui/component</filename>".
+ </para>
+ <para>
<programlisting>template = "app:/groovy/your_portlet_name/webui/component/your_component.gtmpl"
</programlisting>
- <para>
- You can now edit your template file.
- </para>
+ </para>
+ </step>
+ <step>
+ <para>
+ Edit the template file according to the information in the <xref linkend="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file"/>.
+ </para>
+ </step>
+ </procedure>
</section>
<section id="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file">
<title>The template file</title>
<para>
- As we said before, the template file is composed of HTML code and groovy code blocks. There are a few things more that you need to know to fully link your portlet with your template.
+ Component template files are composed in HTML code and groovy code blocks. There are a few things more that you need to know to fully link your portlet with your template.
</para>
<para>
- If your template defines the UI of a component, you have an access to this component instance (the java object) using the variable <literal>uicomponent</literal>. This should be the case almost all the time, but we recommend that you check that your java class inherits from UIComponent before you use this variable. With this <literal>uicomponent</literal> variable, you can access all the attributes and functions of your component, to use them in your template. Example : UIPageIterator.gtmpl:
+ To successfully link a portlet with a template, please ensure the following:
</para>
-
+ <itemizedlist>
+ <listitem>
+ <para>
+ If the template defines the UI of a component, use the java object variable <literal>uicomponent</literal> to access this component instance.
+ </para>
+ <para>
+ This should be the case in most instances, but it is recommended that the java class inherits from <literal>UIComponent</literal> are checked before this variable is used.
+ </para>
+ <para>
+ Using the <literal>uicomponent</literal> variable, you can access all the attributes and functions of a component to use them in your template.
+ </para>
+ <para>
+ Take, for example <literal>UIPageIterator.gtmpl</literal>:
+ </para>
<programlisting><%
def currentPage = uicomponent.getCurrentPage();
%>
@@ -139,22 +184,42 @@
<span></span>
</a>
</programlisting>
- <para>
- This example shows that <literal>uicomponent</literal> can be used to make Ajax calls, thanks to the <literal>event</literal> method. See <xref linkend="sect-Reference_Guide-AJAX_Framework" /> for more details.
- </para>
- <para>
- Another variable that you can use is <literal>ctx</literal>. It gives access to the context in which the template is processed. Hence, you can get some elements like the request, the Javscript manager, or the resource resolver (ctx.appRes). Examples :
- </para>
-
+ <para>
+ The following example shows how <literal>uicomponent</literal> can be used to make Ajax calls using the <literal>event</literal> method. See <xref linkend="sect-Reference_Guide-AJAX_Framework" /> for more details.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Another variable available is <literal>ctx</literal>. This variable gives access to the context in which the template is processed.
+ </para>
+ <para>
+ Use this variable to retrieve elements such as; the request, the Javscript manager or the resource resolver (<literal>ctx.appRes</literal>).
+ </para>
+ <para>
+ Some usage examples are:
+ </para>
<programlisting><%
def rcontext = ctx.getRequestContext() ;
context.getJavascriptManager().importJavascript('GateIn.webui.UIPopupWindow');
ctx.appRes(popupId + ".title."+ title);
%>
</programlisting>
- <para>
- If you use your template to define the user interface of a component that includes a form, you can access the instance of UIForm in a variable named <literal>uiform</literal>. The UIForm class provides the methods, <literal>begin()</literal> and <literal>end()</literal>, that write the HTML tags of the form. Your form class must inherit from <literal>UIForm</literal> , in this class you add the input elements (fields, checkboxes, lists) which you wish to use in your form. In your groovy template you can render your input elements using <literal>uiform.renderField(field)</literal>
- </para>
+ </listitem>
+ <listitem>
+ <para>
+ If the template defines the user interface of a component that includes a form use an instance of <literal>UIForm</literal> in a variable named <literal>uiform</literal>.
+ </para>
+ <para>
+ The <literal>UIForm</literal> class provides the methods <literal>begin()</literal> and <literal>end()</literal> which write the HTML tags of the form.
+ </para>
+ <para>
+ The form class must inherit from <literal>UIForm</literal>. In this class add the input elements (fields, checkboxes, lists) which are required in the form.
+ </para>
+ <para>
+ Render the input elements in the groovy template using <literal>uiform.renderField(field)</literal>.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml 2010-02-03 04:35:37 UTC (rev 1504)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml 2010-02-03 06:59:13 UTC (rev 1505)
@@ -5,26 +5,35 @@
]>
<section id="sect-Reference_Guide-Portlet_Lifecycle">
<title>Portlet Lifecycle</title>
- <section id="sect-Reference_Guide-Portlet_Lifecycle-Overview">
- <title>Overview</title>
<para>
- The goal of this chapter is not to talk about the Portlet API specification lifecycle but more about GateIn UI framework to easily develop portlets.
+ This chapter does not to refer to the Portlet API specification lifecycle but focuses on the &PRODUCT; UI framework.
</para>
<para>
- The web framework used here has been completely developed by GateIn and perfectly suits the portal environment, it even allows to send events from the portlet UIComponents to the Portal ones.
+ This web framework has been developed specifically for &PRODUCT; and, while it is not necessary to use the native web framework to build portlets, all portlets packaged with &PRODUCT; are developed using this framework.
</para>
+ <para>
+ This consistency allows portlets to use several UI components that can be used in different abstracted contexts (such as the portal itself or some portlets).
+ </para>
+ <note>
+ <title>Recommended Reading</title>
+ <para>
+ This chapter is intended for advanced developers. It covers code implementation and logic. It is not a tutorial on how to write portlets.
+ </para>
+ <para>
+ Refer to <xref linkend="sect-Reference_Guide-Portal_Lifecycle" /> for information on concepts that are similar and top hierarchy classes that are shared.
+ </para>
+ </note>
+
+ <section id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_init">
+ <title>Portlet init</title>
<para>
- Of course using the GateIn web framework to build portlets is not necessary and any other web framework that supports portlet environment can be used. But all GateIn portlets that are part of GateIn products are developed using that framework and we provide several UI components that can be used in different abstracted contexts such as the portal itself or some portlets.
+ The main entry point for configuring a portlet is in the <emphasis role="bold">portlet.xml</emphasis> file located in the portlet application WAR.
</para>
<para>
- This chapter is not a tutorial on how to write portlets, it will go in the details of the code implementation and logic; hence it is intended for advanced developers. It is also advised to read the <xref linkend="sect-Reference_Guide-Portal_Lifecycle" /> article before as the that article explains concepts that are similar and top hierarchy classes that are shared.
+ Each portlet built using the &PRODUCT; web framework must reference the <emphasis role="bold">PortletApplicationController</emphasis> .
</para>
- </section>
-
- <section id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_init">
- <title>Portlet init</title>
<para>
- The main entry point for configuring a portlet is in the <emphasis role="bold">portlet.xml</emphasis> file located in the portlet application WAR. Every portlet that shall be built using the GateIn web framework must reference the <emphasis role="bold">PortletApplicationController</emphasis> . The portlet configuration such as the root component is defined in a <emphasis role="bold">configuration.xml</emphasis> file. The path to this configuration.xml file is defined in the init-param " <emphasis role="bold">webui.configuration</emphasis> " of porlet.xml.
+ The portlet configuration (such as the root component) is defined in <filename>configuration.xml</filename>. The path to this file is defined in the init-param "<emphasis role="bold">webui.configuration</emphasis>" of <filename>portlet.xml</filename>.
</para>
<programlisting><portlet>
@@ -40,8 +49,11 @@
</portlet>
</programlisting>
<para>
- The structure of the <emphasis role="bold">configuration.xml</emphasis> file is exactly the same as the <emphasis>webui-configuration.xml</emphasis>which we have already introduced in the <xref linkend="sect-Reference_Guide-Portal_Lifecycle" /> article. In the case of the content portlet it looks like:
+ The structure of the <filename>configuration.xml</filename> file is exactly the same as the <filename>webui-configuration.xml</filename> which was introduced in <xref linkend="sect-Reference_Guide-Portal_Lifecycle" />.
</para>
+ <para>
+ In the case of the content portlet it is formatted as:
+ </para>
<programlisting><webui-configuration>
<application>
@@ -51,10 +63,10 @@
</webui-configuration>
</programlisting>
<para>
- The <emphasis role="bold">PortletApplicationController</emphasis> class extends the <emphasis role="bold">GenericPortlet</emphasis> class defined in the Portlet API specification.
+ The <literal>PortletApplicationController</literal> class extends the <literal>GenericPortlet</literal> class defined in the Portlet API specification.
</para>
<para>
- All methods like <emphasis>processAction()</emphasis> or <emphasis>render()</emphasis> are delegated to the <emphasis role="bold">PortletApplication</emphasis>. The creation and caching inside the <emphasis role="bold">WebController</emphasis> object is described in the following method:
+ All methods (like <literal>processAction()</literal> or <literal>render()</literal>) are delegated to the <literal>PortletApplication</literal>. The creation and caching inside the <literal>WebController</literal> object is shown in the example below:
</para>
<programlisting>/**
@@ -81,14 +93,14 @@
<section id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_request_handler">
<title>Portlet request handler</title>
<para>
- When a portlet, that is deployed in GateIn Portal, is using the GateIn web framework then all methods calls go through the <emphasis role="bold">PortletApplication</emphasis> object which extends the <emphasis role="bold">WebuiApplication</emphasis>.
+ When a portlet using the native web framework is deployed in &PRODUCT;, all methods calls go through the <literal>PortletApplication</literal> object which extends the <literal>WebuiApplication</literal>.
</para>
</section>
<section id="sect-Reference_Guide-Portlet_Lifecycle-ProcessAction_phase">
<title>ProcessAction phase</title>
<para>
- The code of the method in PortletApplication is described here. The business logic is shown in the javadoc:
+ The code of the method in <literal>PortletApplication</literal> is described below. The business logic is shown in the javadoc:
</para>
<programlisting>/**
@@ -131,7 +143,7 @@
}
</programlisting>
<para>
- The <emphasis role="bold">PortletRequestContext</emphasis> extends <emphasis role="bold">WebuiRequestContext</emphasis> class and acts as a wrapper on top of all the portlet request information:
+ The <literal>PortletRequestContext</literal> extends the <literal>WebuiRequestContext</literal> class and acts as a wrapper on all the portlet request information:
</para>
<programlisting>/**
@@ -166,10 +178,12 @@
}
</programlisting>
<para>
- In the PortletApplication, the line
+ In the <literal>PortletApplication</literal>, the line;
</para>
+<programlisting>UIApplication uiApp = getStateManager().restoreUIRootComponent(context);
+</programlisting>
<para>
- <emphasis>UIApplication uiApp = getStateManager().restoreUIRootComponent(context);</emphasis> asks the StateManager defined for the portlet to get the UI root component. In the case of a portlet the root component must extend UIPortletApplication.
+ asks the <literal>StateManager</literal> defined for the portlet to get the UI root component. In the case of a portlet the root component must extend <literal>UIPortletApplication</literal>.
</para>
<programlisting>public class ParentAppStateManager extends StateManager {
@@ -219,7 +233,7 @@
<section id="sect-Reference_Guide-Portlet_Lifecycle-Render_phase">
<title>Render phase</title>
<para>
- The render method business logic is quite similar to processAction().
+ The render method business logic is quite similar to <literal>processAction()</literal>.
</para>
<programlisting>/**
@@ -268,7 +282,7 @@
}
</programlisting>
<para>
- The processRender() call made on the UIPortletApplication is shown now:
+ The following is the <literal>processRender()</literal> call made on the <literal>UIPortletApplication</literal>:
</para>
<programlisting>/**
14 years, 10 months
gatein SVN: r1504 - in portal/branches/3.0.0-Beta05-CP/component/scripting/src: test/java/org/exoplatform/groovyscript and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-02-02 23:35:37 -0500 (Tue, 02 Feb 2010)
New Revision: 1504
Added:
portal/branches/3.0.0-Beta05-CP/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java
Modified:
portal/branches/3.0.0-Beta05-CP/component/scripting/src/main/java/org/exoplatform/groovyscript/GroovyTemplate.java
Log:
GTNPORTAL-553 Correct the name of template file if having "-" sign included
Modified: portal/branches/3.0.0-Beta05-CP/component/scripting/src/main/java/org/exoplatform/groovyscript/GroovyTemplate.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/scripting/src/main/java/org/exoplatform/groovyscript/GroovyTemplate.java 2010-02-03 04:29:14 UTC (rev 1503)
+++ portal/branches/3.0.0-Beta05-CP/component/scripting/src/main/java/org/exoplatform/groovyscript/GroovyTemplate.java 2010-02-03 04:35:37 UTC (rev 1504)
@@ -70,6 +70,8 @@
if (templateName == null)
{
templateName = "fic";
+ } else {
+ templateName = templateName.replaceAll("-", "_");
}
//
Copied: portal/branches/3.0.0-Beta05-CP/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java (from rev 1470, portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java)
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java (rev 0)
+++ portal/branches/3.0.0-Beta05-CP/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java 2010-02-03 04:35:37 UTC (rev 1504)
@@ -0,0 +1,41 @@
+/**
+ * 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.groovyscript;
+
+import junit.framework.TestCase;
+
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:trong.tran@exoplatform.com">Trong Tran</a>
+ * @version $Revision$
+ */
+public class TestGroovyTemplateEngine extends TestCase
+{
+ public void testFileName() throws IOException, TemplateCompilationException
+ {
+
+ GroovyTemplateEngine engine_ = new GroovyTemplateEngine();
+ try {
+ GroovyTemplate template = engine_.createTemplate("/path/to/file-lt.gtmpl", "file-lt.gtmpl", "content of the file.gtmpl");
+ } catch (GroovyCompilationException e) {
+ fail("Creating GroovyTemplate is failed ");
+ }
+ }
+}
14 years, 10 months
gatein SVN: r1503 - in portal/branches/3.0.0-Beta05-CP/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-02-02 23:29:14 -0500 (Tue, 02 Feb 2010)
New Revision: 1503
Modified:
portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java
portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java
portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
Log:
GTNPORTAL-544 Raise up appropriate events when Add/Update/Remove a Portal Config
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java 2010-02-03 03:54:05 UTC (rev 1502)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java 2010-02-03 04:29:14 UTC (rev 1503)
@@ -42,7 +42,24 @@
*/
public interface DataStorage
{
+ public final static String PAGE_CREATED = "org.exoplatform.portal.config.DataStorage.pageCreated".intern();
+
+ public final static String PAGE_REMOVED = "org.exoplatform.portal.config.DataStorage.pageRemoved".intern();
+ public final static String PAGE_UPDATED = "org.exoplatform.portal.config.DataStorage.pageUpdated".intern();
+
+ public final static String NAVIGATION_CREATED = "org.exoplatform.portal.config.DataStorage.navigationCreated".intern();
+
+ public final static String NAVIGATION_REMOVED = "org.exoplatform.portal.config.DataStorage.navigationRemoved".intern();
+
+ public final static String NAVIGATION_UPDATED = "org.exoplatform.portal.config.DataStorage.navigationUpdated".intern();
+
+ public final static String PORTAL_CONFIG_CREATED = "org.exoplatform.portal.config.DataStorage.portalConfigCreated".intern();
+
+ public final static String PORTAL_CONFIG_REMOVED = "org.exoplatform.portal.config.DataStorage.portalConfigRemoved".intern();
+
+ public final static String PORTAL_CONFIG_UPDATED = "org.exoplatform.portal.config.DataStorage.portalConfigUpdated".intern();
+
public void create(PortalConfig config) throws Exception;
public void save(PortalConfig config) throws Exception;
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java 2010-02-03 03:54:05 UTC (rev 1502)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java 2010-02-03 04:29:14 UTC (rev 1503)
@@ -25,12 +25,12 @@
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Dashboard;
-import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.pom.data.DashboardData;
+import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.pom.data.ModelData;
import org.exoplatform.portal.pom.data.ModelDataStorage;
import org.exoplatform.portal.pom.data.NavigationData;
@@ -39,6 +39,7 @@
import org.exoplatform.portal.pom.data.PageKey;
import org.exoplatform.portal.pom.data.PortalData;
import org.exoplatform.portal.pom.data.PortalKey;
+import org.exoplatform.services.listener.ListenerService;
import java.lang.reflect.Array;
import java.util.Comparator;
@@ -50,13 +51,15 @@
*/
public class DataStorageImpl implements DataStorage
{
-
/** . */
private ModelDataStorage delegate;
+
+ private ListenerService listenerServ_ ;
- public DataStorageImpl(ModelDataStorage delegate)
+ public DataStorageImpl(ModelDataStorage delegate, ListenerService listenerServ)
{
this.delegate = delegate;
+ this.listenerServ_ = listenerServ;
}
public Page clonePage(String pageId, String clonedOwnerType, String clonedOwnerId, String clonedName) throws Exception
@@ -72,61 +75,86 @@
return data != null ? new PageNavigation(data) : null;
}
- public void remove(Page page) throws Exception
+ public void create(PortalConfig config) throws Exception
{
- delegate.remove(page.build());
+ delegate.create(config.build());
+ listenerServ_.broadcast(PORTAL_CONFIG_CREATED, this, config);
}
- public <S> S load(ApplicationState<S> state, ApplicationType<S> type) throws Exception
+ public void save(PortalConfig config) throws Exception
{
- return delegate.load(state, type);
+ delegate.save(config.build());
+ listenerServ_.broadcast(PORTAL_CONFIG_UPDATED, this, config);
}
+
+ public void remove(PortalConfig config) throws Exception
+ {
+ delegate.remove(config.build());
+ listenerServ_.broadcast(PORTAL_CONFIG_REMOVED, this, config);
+ }
public void create(Page page) throws Exception
{
delegate.create(page.build());
+ listenerServ_.broadcast(PAGE_CREATED, this, page);
}
- public PortletPreferences getPortletPreferences(String windowID) throws Exception
+ public List<ModelChange> save(Page page) throws Exception
{
- return delegate.getPortletPreferences(windowID);
+ List<ModelChange> changes = delegate.save(page.build());
+ listenerServ_.broadcast(PAGE_UPDATED, this, page);
+ return changes;
}
+
+ public void remove(Page page) throws Exception
+ {
+ delegate.remove(page.build());
+ listenerServ_.broadcast(PAGE_REMOVED, this, page);
+ }
- public <S> ApplicationState<S> save(ApplicationState<S> state, S preferences) throws Exception
+ public void create(PageNavigation navigation) throws Exception
{
- return delegate.save(state, preferences);
+ delegate.create(navigation.build());
+ listenerServ_.broadcast(NAVIGATION_CREATED, this, navigation);
}
- public Container getSharedLayout() throws Exception
+ public void save(PageNavigation navigation) throws Exception
{
- return delegate.getSharedLayout();
+ delegate.save(navigation.build());
+ listenerServ_.broadcast(NAVIGATION_UPDATED, this, navigation);
}
- public void save(PortalConfig config) throws Exception
+ public void remove(PageNavigation navigation) throws Exception
{
- delegate.save(config.build());
+ delegate.remove(navigation.build());
+ listenerServ_.broadcast(NAVIGATION_REMOVED, this, navigation);
}
- public void create(PortalConfig config) throws Exception
+ public <S> S load(ApplicationState<S> state, ApplicationType<S> type) throws Exception
{
- delegate.create(config.build());
+ return delegate.load(state, type);
}
- public PortalConfig getPortalConfig(String portalName) throws Exception
+ public PortletPreferences getPortletPreferences(String windowID) throws Exception
{
- return getPortalConfig(PortalConfig.PORTAL_TYPE, portalName);
+ return delegate.getPortletPreferences(windowID);
}
- public void save(PageNavigation navigation) throws Exception
+ public <S> ApplicationState<S> save(ApplicationState<S> state, S preferences) throws Exception
{
- delegate.save(navigation.build());
+ return delegate.save(state, preferences);
}
- public void remove(PortalConfig config) throws Exception
+ public Container getSharedLayout() throws Exception
{
- delegate.remove(config.build());
+ return delegate.getSharedLayout();
}
+ public PortalConfig getPortalConfig(String portalName) throws Exception
+ {
+ return getPortalConfig(PortalConfig.PORTAL_TYPE, portalName);
+ }
+
public PageNavigation getPageNavigation(String fullId) throws Exception
{
NavigationKey key = NavigationKey.create(fullId);
@@ -141,16 +169,6 @@
return data != null ? new Page(data) : null;
}
- public List<ModelChange> save(Page page) throws Exception
- {
- return delegate.save(page.build());
- }
-
- public void create(PageNavigation navigation) throws Exception
- {
- delegate.create(navigation.build());
- }
-
private abstract class Bilto<O extends ModelObject, D extends ModelData>
{
@@ -260,11 +278,6 @@
return data != null ? new PortalConfig(data) : null;
}
- public void remove(PageNavigation navigation) throws Exception
- {
- delegate.remove(navigation.build());
- }
-
public Dashboard loadDashboard(String dashboardId) throws Exception
{
DashboardData data = delegate.loadDashboard(dashboardId);
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2010-02-03 03:54:05 UTC (rev 1502)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2010-02-03 04:29:14 UTC (rev 1503)
@@ -59,7 +59,7 @@
private ConfigurationManager cmanager_;
- private DataStorage pdcService_;
+ private DataStorage dataStorage_;
private volatile List<?> configs;
@@ -71,11 +71,11 @@
private Log log = ExoLogger.getLogger("Portal:UserPortalConfigService");
- public NewPortalConfigListener(DataStorage pdcService, ConfigurationManager cmanager, InitParams params)
+ public NewPortalConfigListener(DataStorage dataStorage, ConfigurationManager cmanager, InitParams params)
throws Exception
{
cmanager_ = cmanager;
- pdcService_ = pdcService;
+ dataStorage_ = dataStorage;
ObjectParameter objectParam = params.getObjectParam("page.templates");
if (objectParam != null)
@@ -246,7 +246,7 @@
private boolean isInitedDB(String portalName) throws Exception
{
- PortalConfig pconfig = pdcService_.getPortalConfig(portalName);
+ PortalConfig pconfig = dataStorage_.getPortalConfig(portalName);
return pconfig != null;
}
@@ -304,13 +304,13 @@
// Ensure that the PortalConfig has been defined
// The PortalConfig could be empty if the related PortalConfigListener
// has been launched after starting this service
- PortalConfig cfg = pdcService_.getPortalConfig(type, owner);
+ PortalConfig cfg = dataStorage_.getPortalConfig(type, owner);
if (cfg == null)
{
cfg = new PortalConfig(type);
cfg.setPortalLayout(new Container());
cfg.setName(owner);
- pdcService_.create(cfg);
+ dataStorage_.create(cfg);
}
return;
}
@@ -325,14 +325,14 @@
owner = pconfig.getName();
//
- PortalConfig currentPortalConfig = pdcService_.getPortalConfig(type, owner);
+ PortalConfig currentPortalConfig = dataStorage_.getPortalConfig(type, owner);
if (currentPortalConfig == null)
{
- pdcService_.create(pconfig);
+ dataStorage_.create(pconfig);
}
else
{
- pdcService_.save(pconfig);
+ dataStorage_.save(pconfig);
}
}
catch (JiBXException e)
@@ -372,7 +372,7 @@
ArrayList<Page> list = pageSet.getPages();
for (Page page : list)
{
- pdcService_.create(page);
+ dataStorage_.create(page);
}
}
catch (JiBXException e)
@@ -403,15 +403,15 @@
xml = StringUtils.replace(xml, "@owner@", owner);
}
PageNavigation navigation = fromXML(config.getOwnerType(), owner, xml, PageNavigation.class);
- PageNavigation currentNavigation = pdcService_.getPageNavigation(navigation.getOwner());
+ PageNavigation currentNavigation = dataStorage_.getPageNavigation(navigation.getOwner());
if (currentNavigation == null)
{
- pdcService_.create(navigation);
+ dataStorage_.create(navigation);
}
else
{
navigation.merge(currentNavigation);
- pdcService_.save(navigation);
+ dataStorage_.save(navigation);
}
}
catch (JiBXException e)
@@ -446,7 +446,7 @@
ArrayList<PortletPreferences> list = portletSet.getPortlets();
for (PortletPreferences portlet : list)
{
- pdcService_.save(portlet);
+ dataStorage_.save(portlet);
}
}
catch (JiBXException e)
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2010-02-03 03:54:05 UTC (rev 1502)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2010-02-03 04:29:14 UTC (rev 1503)
@@ -19,7 +19,6 @@
package org.exoplatform.portal.config;
-import org.exoplatform.commons.chromattic.ChromatticManager;
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.ComponentPlugin;
@@ -33,7 +32,6 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
import org.exoplatform.portal.pom.data.ModelChange;
-import org.exoplatform.services.listener.ListenerService;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.organization.Group;
@@ -54,42 +52,23 @@
*/
public class UserPortalConfigService implements Startable
{
-
- public final static String CREATE_PAGE_EVENT = "UserPortalConfigService.page.onCreate".intern();
-
- public final static String REMOVE_PAGE_EVENT = "UserPortalConfigService.page.onRemove".intern();
-
- public final static String UPDATE_PAGE_EVENT = "UserPortalConfigService.page.onUpdate".intern();
-
- public final static String CREATE_NAVIGATION_EVENT = "UserPortalConfigService.navigation.onCreate".intern();
-
- public final static String REMOVE_NAVIGATION_EVENT = "UserPortalConfigService.navigation.onRemove".intern();
-
- public final static String UPDATE_NAVIGATION_EVENT = "UserPortalConfigService.navigation.onUpdate".intern();
-
private DataStorage storage_;
private UserACL userACL_;
private OrganizationService orgService_;
- private ListenerService listenerService;
-
private NewPortalConfigListener newPortalConfigListener_;
private Log log = ExoLogger.getLogger("Portal:UserPortalConfigService");
- private ChromatticManager manager;
-
public UserPortalConfigService(
UserACL userACL, DataStorage storage,
- OrganizationService orgService, ListenerService listenerService, ChromatticManager manager) throws Exception
+ OrganizationService orgService) throws Exception
{
this.storage_ = storage;
this.orgService_ = orgService;
- this.listenerService = listenerService;
this.userACL_ = userACL;
- this.manager = manager;
}
/**
@@ -317,7 +296,7 @@
}
/**
- * Removes a page and broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#REMOVE_PAGE_EVENT}
+ * Removes a page and broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#PAGE_REMOVED}
* when the removal is successful.
*
* @param page the page to remove
@@ -326,7 +305,6 @@
public void remove(Page page) throws Exception
{
storage_.remove(page);
- listenerService.broadcast(REMOVE_PAGE_EVENT, this, page);
}
/**
@@ -339,13 +317,10 @@
public void create(Page page) throws Exception
{
storage_.create(page);
-
- //
- listenerService.broadcast(CREATE_PAGE_EVENT, this, page);
}
/**
- * Updates a page and broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#UPDATE_PAGE_EVENT}
+ * Updates a page and broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#PAGE_UPDATED}
* when the creation is successful.
*
* @param page the page to update
@@ -355,9 +330,6 @@
public List<ModelChange> update(Page page) throws Exception
{
List<ModelChange> changes = storage_.save(page);
-
- //
- listenerService.broadcast(UPDATE_PAGE_EVENT, this, page);
return changes;
}
@@ -371,11 +343,10 @@
public void create(PageNavigation navigation) throws Exception
{
storage_.create(navigation);
- listenerService.broadcast(CREATE_NAVIGATION_EVENT, this, navigation);
}
/**
- * Updates a page navigation broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#UPDATE_NAVIGATION_EVENT}
+ * Updates a page navigation broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#NAVIGATION_UPDATED}
* when the creation is successful.
*
* @param navigation the navigation to update
@@ -384,11 +355,10 @@
public void update(PageNavigation navigation) throws Exception
{
storage_.save(navigation);
- listenerService.broadcast(UPDATE_NAVIGATION_EVENT, this, navigation);
}
/**
- * Removes a navigation and broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#REMOVE_NAVIGATION_EVENT}
+ * Removes a navigation and broadcast an event labelled as {@link org.exoplatform.portal.config.UserPortalConfigService#NAVIGATION_REMOVED}
* when the removal is successful.
*
* @param navigation the navigation to remove
@@ -397,7 +367,6 @@
public void remove(PageNavigation navigation) throws Exception
{
storage_.remove(navigation);
- listenerService.broadcast(REMOVE_NAVIGATION_EVENT, this, navigation);
}
public PageNavigation getPageNavigation(String ownerType, String id) throws Exception
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-02-03 03:54:05 UTC (rev 1502)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-02-03 04:29:14 UTC (rev 1503)
@@ -29,20 +29,24 @@
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Dashboard;
-import org.exoplatform.portal.config.model.PageNode;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.pom.spi.gadget.Gadget;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
+import org.exoplatform.services.listener.Event;
+import org.exoplatform.services.listener.Listener;
+import org.exoplatform.services.listener.ListenerService;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.LinkedList;
import java.util.List;
/**
@@ -70,6 +74,10 @@
/** . */
private POMSession session;
+ private LinkedList<Event> events;
+
+ private ListenerService listenerService;
+
public TestDataStorage(String name)
{
super(name);
@@ -77,12 +85,34 @@
public void setUp() throws Exception
{
+ Listener listener = new Listener()
+ {
+ @Override
+ public void onEvent(Event event) throws Exception
+ {
+ events.add(event);
+ }
+ };
+
super.setUp();
begin();
PortalContainer container = PortalContainer.getInstance();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
session = mgr.openSession();
+
+ events = new LinkedList<Event>();
+ listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
+
+ listenerService.addListener(DataStorage.PAGE_CREATED, listener);
+ listenerService.addListener(DataStorage.PAGE_REMOVED, listener);
+ listenerService.addListener(DataStorage.PAGE_UPDATED, listener);
+ listenerService.addListener(DataStorage.NAVIGATION_CREATED, listener);
+ listenerService.addListener(DataStorage.NAVIGATION_REMOVED, listener);
+ listenerService.addListener(DataStorage.NAVIGATION_UPDATED, listener);
+ listenerService.addListener(DataStorage.PORTAL_CONFIG_CREATED, listener);
+ listenerService.addListener(DataStorage.PORTAL_CONFIG_UPDATED, listener);
+ listenerService.addListener(DataStorage.PORTAL_CONFIG_REMOVED, listener);
}
protected void tearDown() throws Exception
@@ -102,6 +132,7 @@
//
storage_.create(portal);
+ assertEquals(1, events.size());
portal = storage_.getPortalConfig(portal.getName());
assertNotNull(portal);
assertEquals("portal", portal.getType());
@@ -116,7 +147,7 @@
//
portal.setLocale("vietnam");
storage_.save(portal);
-
+ assertEquals(1, events.size());
//
portal = storage_.getPortalConfig("portal", "test");
assertNotNull(portal);
@@ -130,8 +161,8 @@
//
storage_.remove(portal);
- portal = storage_.getPortalConfig(testPortal);
- assertNull(portal);
+ assertEquals(1, events.size());
+ assertNull(storage_.getPortalConfig("portal", "test"));
}
public void testCreatePage() throws Exception
@@ -144,6 +175,7 @@
//
storage_.create(page);
+ assertEquals(1, events.size());
//
Page page2 = storage_.getPage(page.getPageId());
@@ -169,12 +201,14 @@
//
storage_.create(page);
+ assertEquals(1, events.size());
//
Page page2 = storage_.getPage(page.getPageId());
page2.setTitle("MyTitle2");
page2.setShowMaxWindow(true);
storage_.save(page2);
+ assertEquals(2, events.size());
page2 = storage_.getPage(page.getPageId());
assertNotNull(page2);
@@ -194,7 +228,8 @@
//
storage_.remove(page);
-
+ assertEquals(1, events.size());
+
//
page = storage_.getPage(testPage);
assertNull(page);
@@ -272,12 +307,14 @@
portal.setLocale("en");
portal.setAccessPermissions(new String[]{UserACL.EVERYONE});
storage_.create(portal);
+ assertEquals(1, events.size());
//
PageNavigation navigation = new PageNavigation();
navigation.setOwnerId("foo");
navigation.setOwnerType("portal");
storage_.create(navigation);
+ assertEquals(2, events.size());
}
public void testSaveNavigation() throws Exception
@@ -288,6 +325,7 @@
//
pageNavi.setModifier("trong.tran");
storage_.save(pageNavi);
+ assertEquals(1, events.size());
//
PageNavigation newPageNavi = storage_.getPageNavigation(pageNavi.getOwnerType(), pageNavi.getOwnerId());
@@ -301,6 +339,7 @@
//
storage_.remove(navigation);
+ assertEquals(1, events.size());
//
navigation = storage_.getPageNavigation("portal", "test");
Modified: portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
--- portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2010-02-03 03:54:05 UTC (rev 1502)
+++ portal/branches/3.0.0-Beta05-CP/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2010-02-03 04:29:14 UTC (rev 1503)
@@ -100,8 +100,6 @@
@Override
protected void setUp() throws Exception
{
-
- //
Listener listener = new Listener()
{
@Override
@@ -126,12 +124,12 @@
{
// I'm using this due to crappy design of
// org.exoplatform.services.listener.ListenerService
- listenerService.addListener(UserPortalConfigService.CREATE_PAGE_EVENT, listener);
- listenerService.addListener(UserPortalConfigService.REMOVE_PAGE_EVENT, listener);
- listenerService.addListener(UserPortalConfigService.UPDATE_PAGE_EVENT, listener);
- listenerService.addListener(UserPortalConfigService.CREATE_NAVIGATION_EVENT, listener);
- listenerService.addListener(UserPortalConfigService.REMOVE_NAVIGATION_EVENT, listener);
- listenerService.addListener(UserPortalConfigService.UPDATE_NAVIGATION_EVENT, listener);
+ listenerService.addListener(DataStorage.PAGE_CREATED, listener);
+ listenerService.addListener(DataStorage.PAGE_REMOVED, listener);
+ listenerService.addListener(DataStorage.PAGE_UPDATED, listener);
+ listenerService.addListener(DataStorage.NAVIGATION_CREATED, listener);
+ listenerService.addListener(DataStorage.NAVIGATION_REMOVED, listener);
+ listenerService.addListener(DataStorage.NAVIGATION_UPDATED, listener);
}
}
@@ -451,7 +449,7 @@
userPortalConfigSer_.remove(page);
assertEquals(1, events.size());
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.REMOVE_PAGE_EVENT, event.getEventName());
+ assertEquals(DataStorage.PAGE_REMOVED, event.getEventName());
Page p = ((Page)event.getData());
assertEquals("group", p.getOwnerType());
assertEquals("/platform/administrators", p.getOwnerId());
@@ -475,7 +473,7 @@
userPortalConfigSer_.create(page);
assertEquals(1, events.size());
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.CREATE_PAGE_EVENT, event.getEventName());
+ assertEquals(DataStorage.PAGE_CREATED, event.getEventName());
Page p = ((Page)event.getData());
assertEquals("group", p.getOwnerType());
assertEquals("/platform/administrators", p.getOwnerId());
@@ -526,7 +524,7 @@
userPortalConfigSer_.create(page);
assertEquals(1, events.size());
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.CREATE_PAGE_EVENT, event.getEventName());
+ assertEquals(DataStorage.PAGE_CREATED, event.getEventName());
Page p = ((Page)event.getData());
assertEquals("group", p.getOwnerType());
assertEquals("/platform/administrators", p.getOwnerId());
@@ -584,7 +582,7 @@
userPortalConfigSer_.remove(navigation);
assertEquals(1, events.size());
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.REMOVE_NAVIGATION_EVENT, event.getEventName());
+ assertEquals(DataStorage.NAVIGATION_REMOVED, event.getEventName());
PageNavigation n = ((PageNavigation)event.getData());
assertEquals("group", n.getOwnerType());
assertEquals("/platform/administrators", n.getOwnerId());
@@ -608,7 +606,7 @@
userPortalConfigSer_.create(navigation);
assertEquals(1, events.size());
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.CREATE_NAVIGATION_EVENT, event.getEventName());
+ assertEquals(DataStorage.NAVIGATION_CREATED, event.getEventName());
PageNavigation n = ((PageNavigation)event.getData());
assertEquals("group", n.getOwnerType());
assertEquals("/platform/administrators", n.getOwnerId());
@@ -649,7 +647,7 @@
{
userPortalConfigSer_.create(navigation);
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.CREATE_NAVIGATION_EVENT, event.getEventName());
+ assertEquals(DataStorage.CREATE_NAVIGATION_EVENT, event.getEventName());
PageNavigation n1 = (PageNavigation)event.getSource();
assertEquals(ownerType, n1.getOwnerType());
assertEquals(ownerId, n1.getOwnerId());
@@ -693,7 +691,7 @@
userPortalConfigSer_.update(navigation);
assertEquals(1, events.size());
Event event = events.removeFirst();
- assertEquals(UserPortalConfigService.UPDATE_NAVIGATION_EVENT, event.getEventName());
+ assertEquals(DataStorage.NAVIGATION_UPDATED, event.getEventName());
PageNavigation n = ((PageNavigation)event.getData());
assertEquals("group", n.getOwnerType());
assertEquals("/platform/administrators", n.getOwnerId());
14 years, 10 months
gatein SVN: r1502 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-02-02 22:54:05 -0500 (Tue, 02 Feb 2010)
New Revision: 1502
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
Log:
GTNPORTAL-504: Don't show Edit/Delete actions in group info in User and Group management portlet
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2010-02-02 23:36:41 UTC (rev 1501)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2010-02-03 03:54:05 UTC (rev 1502)
@@ -21,6 +21,7 @@
import org.exoplatform.commons.utils.EmptySerializablePageList;
import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.Membership;
import org.exoplatform.services.organization.MembershipHandler;
@@ -146,9 +147,12 @@
if (group != null)
{
String groupId = group.getId();
- // show action if is administrator
- boolean showAction = GroupManagement.isAdministrator(null);
+ String currentUser = Util.getPortalRequestContext().getRemoteUser();
+ // show action if user is administrator or manager of current group
+ boolean showAction =
+ GroupManagement.isAdministrator(currentUser) || GroupManagement.isManagerOfGroup(currentUser, groupId);
+
if (!showAction)
{
pageList.setPageSize(10);
14 years, 10 months