gatein SVN: r5949 - in portal/branches/shindig2: gadgets/core and 7 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2011-02-28 05:42:35 -0500 (Mon, 28 Feb 2011)
New Revision: 5949
Modified:
portal/branches/shindig2/gadgets/core/pom.xml
portal/branches/shindig2/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoModule.java
portal/branches/shindig2/gadgets/server/pom.xml
portal/branches/shindig2/gadgets/server/src/main/webapp/WEB-INF/web.xml
portal/branches/shindig2/gadgets/server/src/main/webapp/containers/default/container.js
portal/branches/shindig2/pom.xml
portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
portal/branches/shindig2/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/GadgetUtil.java
portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
- Fix RPC service to help getting gadget's metadata by calling rpc URI: gadgets/api/rpc. I also remove shindig-server dependency that don't be used anywhere in GateIn.
- Change fetching gadget data of GateIn, instead of calling metadata service,now we will use via RPC
Modified: portal/branches/shindig2/gadgets/core/pom.xml
===================================================================
--- portal/branches/shindig2/gadgets/core/pom.xml 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/gadgets/core/pom.xml 2011-02-28 10:42:35 UTC (rev 5949)
@@ -91,6 +91,10 @@
<artifactId>shindig-features</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-social-api</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.api</artifactId>
</dependency>
Modified: portal/branches/shindig2/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoModule.java
===================================================================
--- portal/branches/shindig2/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoModule.java 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoModule.java 2011-02-28 10:42:35 UTC (rev 5949)
@@ -20,9 +20,17 @@
package org.exoplatform.portal.gadget.core;
import com.google.inject.AbstractModule;
+import com.google.inject.name.Names;
+
import org.apache.shindig.config.ContainerConfig;
import org.apache.shindig.gadgets.DefaultGuiceModule;
import org.apache.shindig.gadgets.http.HttpFetcher;
+import org.apache.shindig.protocol.conversion.BeanConverter;
+import org.apache.shindig.protocol.conversion.BeanJsonConverter;
+import org.apache.shindig.protocol.conversion.BeanXStreamConverter;
+import org.apache.shindig.protocol.conversion.xstream.XStreamConfiguration;
+import org.apache.shindig.social.core.util.xstream.XStream081Configuration;
+import org.apache.shindig.social.core.util.BeanXStreamAtomConverter;
/**
* The goal of the module is to bind the {@link org.apache.shindig.common.ContainerConfig} interface to the
@@ -40,5 +48,9 @@
{
bind(ContainerConfig.class).to(ExoContainerConfig.class);
bind(HttpFetcher.class).to(ExoHttpFetcher.class);
+ bind(XStreamConfiguration.class).to(XStream081Configuration.class);
+ bind(BeanConverter.class).annotatedWith(Names.named("shindig.bean.converter.xml")).to(BeanXStreamConverter.class);
+ bind(BeanConverter.class).annotatedWith(Names.named("shindig.bean.converter.json")).to(BeanJsonConverter.class);
+ bind(BeanConverter.class).annotatedWith(Names.named("shindig.bean.converter.atom")).to(BeanXStreamAtomConverter.class);
}
}
Modified: portal/branches/shindig2/gadgets/server/pom.xml
===================================================================
--- portal/branches/shindig2/gadgets/server/pom.xml 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/gadgets/server/pom.xml 2011-02-28 10:42:35 UTC (rev 5949)
@@ -49,12 +49,6 @@
<!-- project dependencies -->
<dependency>
<groupId>org.apache.shindig</groupId>
- <artifactId>shindig-server</artifactId>
- <type>war</type>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.shindig</groupId>
<artifactId>shindig-features</artifactId>
<scope>provided</scope>
</dependency>
Modified: portal/branches/shindig2/gadgets/server/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/branches/shindig2/gadgets/server/src/main/webapp/WEB-INF/web.xml 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/gadgets/server/src/main/webapp/WEB-INF/web.xml 2011-02-28 10:42:35 UTC (rev 5949)
@@ -79,7 +79,6 @@
</filter-mapping>
<listener>
- <!--<listener-class>org.apache.shindig.common.servlet.GuiceServletContextListener</listener-class>-->
<listener-class>org.exoplatform.portal.gadget.core.GateInGuiceServletContextListener</listener-class>
</listener>
@@ -139,7 +138,7 @@
</servlet-class>
<init-param>
<param-name>handlers</param-name>
- <param-value>org.apache.shindig.gadgets.handlers</param-value>
+ <param-value>org.apache.shindig.handlers</param-value>
</init-param>
</servlet>
@@ -150,7 +149,7 @@
</servlet-class>
<init-param>
<param-name>handlers</param-name>
- <param-value>org.apache.shindig.gadgets.handlers</param-value>
+ <param-value>org.apache.shindig.handlers</param-value>
</init-param>
</servlet>
Modified: portal/branches/shindig2/gadgets/server/src/main/webapp/containers/default/container.js
===================================================================
--- portal/branches/shindig2/gadgets/server/src/main/webapp/containers/default/container.js 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/gadgets/server/src/main/webapp/containers/default/container.js 2011-02-28 10:42:35 UTC (rev 5949)
@@ -80,7 +80,7 @@
//New configuration for iframeUri generation:
"gadgets.uri.iframe.lockedDomainSuffix" : "-a.example.com:8080",
-"gadgets.uri.iframe.unlockedDomain" : "localhost:8080",
+"gadgets.uri.iframe.unlockedDomain" : "http://localhost:8080",
"gadgets.uri.iframe.basePath" : "/eXoGadgetServer/gadgets/ifr",
@@ -94,7 +94,7 @@
// Config param to load Opensocial data for social
// preloads in data pipelining. %host% will be
// substituted with the current host.
-"gadgets.osDataUri" : "http://%host%/social/rpc",
+"gadgets.osDataUri" : "http://%host%/rpc",
"gadgets.signingKeyFile" : "oauthkey.pem",
"gadgets.signingKeyName" : "mytestkey",
@@ -172,7 +172,8 @@
"opensocial-0.8" : {
// Path to fetch opensocial data from
// Must be on the same domain as the gadget rendering server
- "path" : "http://%host%/social",
+ "path" : "http://%host%/rpc",
+ "invalidatePath" : "http://%host%/rpc",
"domain" : "shindig",
"enableCaja" : false,
"supportedFields" : {
@@ -190,10 +191,10 @@
// E.g. "gadgets.rpc" : ["activities.requestCreate", "messages.requestSend", "requestShareApp", "requestPermission"]
"gadgets.rpc" : ["container.listMethods"]
},
-// "osapi" : {
-// // The endpoints to query for available JSONRPC/REST services
-// "endPoints" : [ "http://%host%/social/rpc", "http://%host%/gadgets/api/rpc" ]
-// },
+ "osapi" : {
+ // The endpoints to query for available JSONRPC/REST services
+ "endPoints" : [ "http://%host%/rpc" ]
+ },
"osml": {
// OSML library resource. Can be set to null or the empty string to disable OSML
// for a container.
Modified: portal/branches/shindig2/pom.xml
===================================================================
--- portal/branches/shindig2/pom.xml 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/pom.xml 2011-02-28 10:42:35 UTC (rev 5949)
@@ -878,17 +878,6 @@
</dependency>
<dependency>
<groupId>org.apache.shindig</groupId>
- <artifactId>shindig-server</artifactId>
- <version>${org.shindig.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shindig</groupId>
- <artifactId>shindig-server</artifactId>
- <version>${org.shindig.version}</version>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.apache.shindig</groupId>
<artifactId>shindig-social-api</artifactId>
<version>${org.shindig.version}</version>
</dependency>
Modified: portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2011-02-28 10:42:35 UTC (rev 5949)
@@ -631,7 +631,7 @@
var j = 0;
for (var att in prefs) {
//TODO: dang.tung not append when using list
- type = prefs[att].type;
+ type = prefs[att].dataType.toLowerCase();
if(type == "list"|| type == "hidden") continue;
// end
var attEl = document.createElement("div");
Modified: portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
===================================================================
--- portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2011-02-28 10:42:35 UTC (rev 5949)
@@ -52,11 +52,11 @@
var gadget;
if (metadata != null) {
// Check if gadget's height is not set and current view is canvas. By default, gadget's height is 800px
- if(metadata.gadgets[0].height == 0 && view == 'canvas') {
- metadata.gadgets[0].height = "800px";
+ if(metadata.modulePrefs.height == 0 && view == 'canvas') {
+ metadata.modulePrefs.height = "800px";
}
- gadget = gadgets.container.createGadget({specUrl: url,height: metadata.gadgets[0].height, secureToken: metadata.gadgets[0].secureToken, view: view});
- gadget.metadata = metadata.gadgets[0];
+ gadget = gadgets.container.createGadget({specUrl: url,height: metadata.modulePrefs.height, secureToken: metadata.secureToken, view: view});
+ gadget.metadata = metadata;
} else {
gadget = gadgets.container.createGadget({specUrl: url});
}
@@ -101,7 +101,7 @@
gadgetControl.style.display = "block";
var gadgetTitle = eXo.core.DOMUtil.findFirstDescendantByClass(gadgetControl, "div", "GadgetTitle") ;
gadgetTitle.style.display = "block";
- if (metadata && metadata.title != null && metadata.title.length > 0) gadgetTitle.innerHTML = metadata.title;
+ if (metadata && metadata.modulePrefs.title != null && metadata.modulePrefs.title.length > 0) gadgetTitle.innerHTML = metadata.modulePrefs.title;
}
if (inDesktop) {
Modified: portal/branches/shindig2/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- portal/branches/shindig2/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-02-28 10:42:35 UTC (rev 5949)
@@ -20,7 +20,7 @@
def isLossData = uicomponent.isLossData();
if(!isLossData) {
url = uicomponent.getUrl();
- metadata = uicomponent.getMetadata();
+ metadata = uicomponent.getRpcMetadata();
userPref = uicomponent.getUserPref();
jsmanager.importJavascript("eXo.gadget.UIGadget");
rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget = '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget") + "';");
Modified: portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/GadgetUtil.java
===================================================================
--- portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/GadgetUtil.java 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/GadgetUtil.java 2011-02-28 10:42:35 UTC (rev 5949)
@@ -28,6 +28,7 @@
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.gadget.core.SecurityTokenGenerator;
import org.exoplatform.portal.webui.util.Util;
+import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -73,6 +74,7 @@
*
* @return the string represents metadata of gadget application
*/
+ @Deprecated
public static String fetchGagdetMetadata(String urlStr)
{
String result = null;
@@ -82,14 +84,15 @@
(GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
try
{
- String data =
- "{\"context\":{\"country\":\"" + gadgetService.getCountry() + "\",\"language\":\""
- + gadgetService.getLanguage() + "\"},\"gadgets\":[" + "{\"moduleId\":" + gadgetService.getModuleId()
- + ",\"url\":\"" + urlStr + "\",\"prefs\":[]}]}";
+ String data = "[{method:\"gadgets.metadata\", id:\"test\", params: {ids:[\""
+ + urlStr + "\"], container:\"default\", language:\""
+ + gadgetService.getLanguage() + "\", country:\"" + gadgetService.getCountry() + "\", view:\"home\"}}]";
+
// Send data
String gadgetServer = getGadgetServerUrl();
- URL url = new URL(gadgetServer + (gadgetServer.endsWith("/") ? "" : "/") + "metadata");
+ URL url = new URL(gadgetServer + (gadgetServer.endsWith("/") ? "" : "/") + "api/rpc");
URLConnection conn = url.openConnection();
+ conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
@@ -106,6 +109,47 @@
return result;
}
+ /**
+ * Fetchs Metatada of gadget application, create the connection to shindig
+ * server to get the metadata TODO cache the informations for better
+ * performance
+ *
+ * @return the string represents metadata of gadget application
+ */
+ public static String fetchGagdetRpcMetadata(String urlStr)
+ {
+ String result = null;
+
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ GadgetRegistryService gadgetService =
+ (GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
+ try
+ {
+ String data = "[{method:\"gadgets.metadata\", id:\"test\", params: {ids:[\""
+ + urlStr + "\"], container:\"default\", language:\""
+ + gadgetService.getLanguage() + "\", country:\"" + gadgetService.getCountry() + "\", view:\"home\"}}]";
+
+ // Send data
+ String gadgetServer = getGadgetServerUrl();
+ URL url = new URL(gadgetServer + (gadgetServer.endsWith("/") ? "" : "/") + "api/rpc");
+ URLConnection conn = url.openConnection();
+ conn.setRequestProperty("Content-Type", "application/json");
+ conn.setDoOutput(true);
+ OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
+ wr.write(data);
+ wr.flush();
+ // Get the response
+ result = IOUtils.toString(conn.getInputStream(), "UTF-8");
+ wr.close();
+ }
+ catch (IOException ioexc)
+ {
+ ioexc.printStackTrace();
+ return "{}";
+ }
+ return result;
+ }
+
public static String createToken(String gadgetURL, Long moduleId)
{
SecurityTokenGenerator tokenGenerator =
@@ -125,9 +169,9 @@
static public Map<String, String> getMapMetadata(String url) throws JSONException
{
Map<String, String> mapMetaData = new HashMap<String, String>();
- String metadata = fetchGagdetMetadata(url);
+ String metadata = fetchGagdetRpcMetadata(url);
metadata = metadata.substring(metadata.indexOf("[") + 1, metadata.lastIndexOf("]"));
- JSONObject jsonObj = new JSONObject(metadata);
+ JSONObject jsonObj = new JSONObject(metadata).getJSONObject(UIGadget.RPC_RESULT).getJSONObject(url).getJSONObject(UIGadget.METADATA_MODULEPREFS);
Iterator<String> iter = jsonObj.keys();
while (iter.hasNext())
{
Modified: portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2011-02-28 08:13:04 UTC (rev 5948)
+++ portal/branches/shindig2/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2011-02-28 10:42:35 UTC (rev 5949)
@@ -94,8 +94,12 @@
public static final String METADATA_USERPREFS = "userPrefs";
- public static final String METADATA_USERPREFS_TYPE = "type";
+ public static final String METADATA_MODULEPREFS = "modulePrefs";
+ public static final String RPC_RESULT = "result";
+
+ public static final String METADATA_USERPREFS_TYPE = "dataType";
+
public static final String METADATA_USERPREFS_TYPE_HIDDEN = "hidden";
public static final String METADATA_USERPREFS_TYPE_LIST = "list";
@@ -207,13 +211,14 @@
this.properties_ = properties;
}
+ @Deprecated
public String getMetadata()
{
try
{
if (metadata_ == null)
{
- String strMetadata = GadgetUtil.fetchGagdetMetadata(getUrl());
+ String strMetadata = GadgetUtil.fetchGagdetRpcMetadata(getUrl());
metadata_ = new JSONObject(strMetadata);
}
JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
@@ -226,6 +231,27 @@
return null;
}
}
+
+ public String getRpcMetadata()
+ {
+ try
+ {
+ if (metadata_ == null)
+ {
+ String gadgetUrl = getUrl();
+ String strMetadata = GadgetUtil.fetchGagdetRpcMetadata(gadgetUrl);
+ metadata_ = new JSONArray(strMetadata).getJSONObject(0).getJSONObject(UIGadget.RPC_RESULT).getJSONObject(gadgetUrl);
+ }
+ String token = GadgetUtil.createToken(this.getUrl(), new Random().nextLong());
+ metadata_.put("secureToken", token);
+ return metadata_.toString();
+ }
+ catch (JSONException e)
+ {
+ return null;
+ }
+ }
+
/**
* Check if content of gadget has <UserPref>? (Content is parsed from gadget specification in .xml file)
* @return boolean
@@ -236,8 +262,7 @@
{
if(metadata_ != null)
{
- JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
- JSONObject userPrefs = obj.getJSONObject(METADATA_USERPREFS);
+ JSONObject userPrefs = metadata_.getJSONObject(METADATA_USERPREFS);
JSONArray names = userPrefs.names();
int count = names.length();
if(count > 0)
13 years, 10 months
gatein SVN: r5948 - portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-02-28 03:13:04 -0500 (Mon, 28 Feb 2011)
New Revision: 5948
Modified:
portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
Log:
GTNPORTAL-1625 Component block height is not correct when dnd a container
Modified: portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css 2011-02-28 07:34:47 UTC (rev 5947)
+++ portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIPortalComponent/Stylesheet.css 2011-02-28 08:13:04 UTC (rev 5948)
@@ -123,7 +123,7 @@
/*############### End Decorator ###################################################*/
.LAYOUT-CONTAINER .UIContainer {
- height: 100%;
+ _height: 100%;
/*
fix bug dragdrop in IE6
*/
13 years, 10 months
gatein SVN: r5947 - portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2011-02-28 02:34:47 -0500 (Mon, 28 Feb 2011)
New Revision: 5947
Added:
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp
Modified:
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp
Log:
GTNPORTAL-1710: Can't overide the welcome-file
Modified: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp 2011-02-25 14:02:01 UTC (rev 5946)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/index.jsp 2011-02-28 07:34:47 UTC (rev 5947)
@@ -19,17 +19,15 @@
--%>
-<%@ page import="org.exoplatform.container.PortalContainer"%>
-<%@ page import="org.exoplatform.portal.config.UserPortalConfigService"%>
+<%@page import="org.exoplatform.commons.utils.PropertyManager" %>
<%
- PortalContainer manager = PortalContainer.getCurrentInstance(session.getServletContext());
- UserPortalConfigService userPortalConfigService = (UserPortalConfigService)manager.getComponentInstanceOfType(UserPortalConfigService.class);
- String remoteUser = request.getRemoteUser();
- String accessMode = "public";
- if (remoteUser != null && remoteUser.trim().length() > 0)
+ String welcomeJSP = PropertyManager.getProperty("gatein.portal.welcomePage");
+
+ if(welcomeJSP == null)
{
- accessMode = "private";
+ welcomeJSP = "welcome.jsp";
}
- response.sendRedirect(request.getContextPath() + "/" + accessMode + "/" + userPortalConfigService.getDefaultPortal() + "/");
+
+ response.sendRedirect(request.getContextPath() + "/" + welcomeJSP);
%>
Added: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp (rev 0)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/welcome.jsp 2011-02-28 07:34:47 UTC (rev 5947)
@@ -0,0 +1,35 @@
+<%--
+
+ 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.
+
+--%>
+
+<%@ page import="org.exoplatform.container.PortalContainer"%>
+<%@ page import="org.exoplatform.portal.config.UserPortalConfigService"%>
+<%
+ PortalContainer manager = PortalContainer.getCurrentInstance(session.getServletContext());
+ UserPortalConfigService userPortalConfigService = (UserPortalConfigService)manager.getComponentInstanceOfType(UserPortalConfigService.class);
+ String remoteUser = request.getRemoteUser();
+ String accessMode = "public";
+ if (remoteUser != null && remoteUser.trim().length() > 0)
+ {
+ accessMode = "private";
+ }
+ response.sendRedirect(request.getContextPath() + "/" + accessMode + "/" + userPortalConfigService.getDefaultPortal() + "/");
+%>
+
13 years, 10 months
gatein SVN: r5946 - portal/trunk/component/portal/src/test/java/org/exoplatform/portal.
by do-not-reply@jboss.org
Author: nscavell
Date: 2011-02-25 09:02:01 -0500 (Fri, 25 Feb 2011)
New Revision: 5946
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
Log:
Add MD5 hash test for gatein_objects_1_2.xsd.
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-02-25 10:47:08 UTC (rev 5945)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-02-25 14:02:01 UTC (rev 5946)
@@ -59,5 +59,6 @@
{
assertHash("d0591b0a022a0c2929e1aed8979857cd", "gatein_objects_1_0.xsd");
assertHash("99ae24c9bbfe1b59e066756a29ab6c79", "gatein_objects_1_1.xsd");
+ assertHash("a3e06cf2a8c72cd8528e1112415e0b8b", "gatein_objects_1_2.xsd");
}
}
13 years, 10 months
gatein SVN: r5945 - in portal/branches/branch-GTNPORTAL-1822: web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/background and 5 other directories.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-02-25 05:47:08 -0500 (Fri, 25 Feb 2011)
New Revision: 5945
Added:
portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/background/
portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/background/AddTab.gif
Modified:
portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/Stylesheet.css
portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css
portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UITabs/Stylesheet.css
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl
portal/branches/branch-GTNPORTAL-1822/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java
Log:
GTNPORTAL-1417 Support to newly add tab at run-time for the Tab Layout Container
Modified: portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/Stylesheet.css
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/Stylesheet.css 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/Stylesheet.css 2011-02-25 10:47:08 UTC (rev 5945)
@@ -1,22 +1,22 @@
-/**
- * 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.
- */
-
+/**
+ * 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.
+ */
+
.UITabContainer {
padding: 7px;
}
@@ -47,6 +47,14 @@
height: 24px;
}
+.UITabContainer .UIHorizontalTabs .AddTab {
+ height: 24px;
+ width: 23px;
+ background: url("background/AddTab.gif") no-repeat left top;
+ float: left;
+ cursor: pointer;
+}
+
.UITabContainer .SelectedTab .EditIcon {
width: 16px; height: 24px;
background: url('/eXoResources/skin/DefaultSkin/skinIcons/16x16/icons/SelectedEditTab.gif') no-repeat center; /* orientation=lt */
Added: portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/background/AddTab.gif
===================================================================
(Binary files differ)
Property changes on: portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UITabContainer/background/AddTab.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupCategory/Stylesheet.css 2011-02-25 10:47:08 UTC (rev 5945)
@@ -109,7 +109,9 @@
background: #efefef;
border-bottom: 1px #cdcdcd solid;
cursor: pointer;
- display: block;
+ display: block;
+ text-align: left;
+ width: auto;
}
.UIPopupCategory .CategoryItem:hover {
Modified: portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UITabs/Stylesheet.css
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UITabs/Stylesheet.css 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UITabs/Stylesheet.css 2011-02-25 10:47:08 UTC (rev 5945)
@@ -21,7 +21,7 @@
}
.UIHorizontalTabs .CenterHorizontalTabs {
- overflow-y: hidden;
+ /*overflow-y: hidden;*/
background: url('background/NormalTabStyle.gif') repeat-x center top;
padding: 0px 6px;
}
Modified: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-02-25 10:47:08 UTC (rev 5945)
@@ -998,6 +998,13 @@
UITableColumnContainer.tooltip.editContainer=Edit Table
############################################################################
+ # org.exoplatform.portal.webui.container.UITableColumnContainer#
+ ############################################################################
+
+UITabContainer.label.moveLeft=Move Left
+UITabContainer.label.moveRight=Move Right
+
+ ############################################################################
# org.exoplatform.portal.component.view.UIPage #
############################################################################
Modified: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-02-25 10:47:08 UTC (rev 5945)
@@ -954,6 +954,13 @@
UITableColumnContainer.tooltip.editContainer=Sửa thuộc tính của bảng
############################################################################
+ # org.exoplatform.portal.webui.container.UITableColumnContainer#
+ ############################################################################
+
+UITabContainer.label.moveLeft=Chuyển sang trái
+UITabContainer.label.moveRight=Chuyển sang phải
+
+ ############################################################################
# org.exoplatform.portal.component.view.UIPage #
############################################################################
Modified: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/container/UITabContainer.gtmpl 2011-02-25 10:47:08 UTC (rev 5945)
@@ -49,9 +49,13 @@
if(uiChild.isRendered()) status = "SelectedTab";
String title = uiChild.getTitle();
String tabId = uiChild.getId();
- if(title == null || title.trim().length() < 1 ) title = _ctx.appRes("UITabContainer.tab") +String.valueOf(counter);
+ if(title == null || title.trim().length() < 1 ) {
+ title = _ctx.appRes("UITabContainer.tab") + String.valueOf(counter);
+ uiChild.setTitle(title);
+ }
else title = ExpressionUtil.getExpressionValue(res, title);
String selectTab = uicomponent.event("SelectTab", tabId);
+ String tabState = uicomponent.getTabState(uiChild, uicomponent);
%>
<div class="UITab NormalTabStyle">
<div class="<%=status%>">
@@ -60,10 +64,46 @@
<%
if(uiChild.isShowEditControl()){
String actionLink = uicomponent.event("EditContainer", "$uiChild.id") - "javascript:";
+ String showCategory = "eXo.webui.UIPopupSelectCategory.show(this, event);"
+ String moveLeftAction = uicomponent.event("MoveLeft", tabId);
+ String moveRightAction = uicomponent.event("MoveRight", tabId);
%>
<div class="MiddleTab ClearFix">
<div class="TabLabel FloatLeft" onclick="eXo.webui.UIHorizontalTabs.changeTabForUITabPane(this,'$id', '$tabId' );<%= selectTab %>"><%=title%></div>
- <div class="EditIcon" onclick="<%=actionLink%>"></div>
+ <div class="EditIcon" onclick="$showCategory">
+ <div style="position: relative; width: 100%">
+ <div class="UIPopupCategory" style="display: none;">
+ <div class="PopupCategoryDecorator">
+ <div class="PopupCategoryTL">
+ <div class="PopupCategoryTR">
+ <div class="PopupCategoryTC"><span></span></div>
+ </div>
+ </div>
+ <div class="PopupCategoryML">
+ <div class="PopupCategoryMR">
+ <div class="PopupCategoryMC">
+ <% if (!tabState.equals(org.exoplatform.portal.webui.container.UITabContainer.FIRST_TAB)) {%>
+ <a class="CategoryItem">
+ <div class="CategoryItemLabel" onclick="$moveLeftAction"><%= _ctx.appRes("UITabContainer.label.moveLeft") %></div>
+ </a>
+ <% } %>
+ <% if (!tabState.equals(org.exoplatform.portal.webui.container.UITabContainer.LAST_TAB)) { %>
+ <a class="CategoryItem">
+ <div class="CategoryItemLabel" onclick="$moveRightAction"><%= _ctx.appRes("UITabContainer.label.moveRight") %></div>
+ </a>
+ <% } %>
+ </div>
+ </div>
+ </div>
+ <div class="PopupCategoryBL">
+ <div class="PopupCategoryBR">
+ <div class="PopupCategoryBC"><span></span></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
<%} else {%>
<div class="MiddleTab">
<a class="TabLabel" onclick="eXo.webui.UIHorizontalTabs.changeTabForUITabPane(this,'$id', '$tabId' );<%= selectTab %>"><%=title%></a>
@@ -76,13 +116,21 @@
<%
counter++;
}
- %>
+ %>
+ <% String addTabLink = uicomponent.event("AddTab");
+ if (uicomponent.isShowEditControl()) {
+ %>
+ <div class="AddTab" onclick="$addTabLink">
+ <span></span>
+ </div>
+ <% } %>
</div>
+
</div>
+
</div>
</div>
</div>
-
<div class="HorizontalLayout TabContent">
<%
String style = "";
Modified: portal/branches/branch-GTNPORTAL-1822/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java 2011-02-25 09:49:42 UTC (rev 5944)
+++ portal/branches/branch-GTNPORTAL-1822/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UITabContainer.java 2011-02-25 10:47:08 UTC (rev 5945)
@@ -19,6 +19,7 @@
package org.exoplatform.portal.webui.container;
+import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.webui.container.UIContainerActionListener.EditContainerActionListener;
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.DeleteComponentActionListener;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -27,6 +28,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import java.util.Collections;
import java.util.List;
/**
@@ -35,16 +37,59 @@
@ComponentConfig(template = "system:/groovy/portal/webui/container/UITabContainer.gtmpl", events = {
@EventConfig(listeners = EditContainerActionListener.class),
@EventConfig(listeners = DeleteComponentActionListener.class, confirm = "UIContainer.deleteContainer"),
- @EventConfig(listeners = UITabContainer.SelectTabActionListener.class)})
+ @EventConfig(listeners = UITabContainer.SelectTabActionListener.class),
+ @EventConfig(listeners = UITabContainer.MoveLeftActionListener.class),
+ @EventConfig(listeners = UITabContainer.MoveRightActionListener.class),
+ @EventConfig(listeners = UITabContainer.AddTabActionListener.class)})
public class UITabContainer extends UIContainer
{
+
public static final String TAB_CONTAINER = "TabContainer";
+ public static final String FIRST_TAB = "FirstTab";
+ public static final String LAST_TAB = "LastTab";
public UITabContainer()
{
super();
}
+ private void moveTab(UITabContainer container, String childId, boolean isToLeft)
+ {
+ UIComponent selectedChild = container.getChildById(childId);
+ List<UIComponent> children = container.getChildren();
+ int selectedIndex = children.indexOf(selectedChild);
+ if (isToLeft)
+ {
+ if (selectedIndex > 0)
+ {
+ Collections.swap(children, selectedIndex, selectedIndex - 1);
+ }
+ }
+ else
+ {
+ if (selectedIndex < children.size() - 1)
+ {
+ Collections.swap(children, selectedIndex, selectedIndex + 1);
+ }
+ }
+ }
+
+ public String getTabState(UIComponent uiChild, UITabContainer uiContainer)
+ {
+ String tabState = "";
+ List<UIComponent> children = uiContainer.getChildren();
+ int tabIndex = children.indexOf(uiChild);
+ if (tabIndex == 0)
+ {
+ tabState = FIRST_TAB;
+ }
+ else if (tabIndex == children.size() - 1)
+ {
+ tabState = LAST_TAB;
+ }
+ return tabState;
+ }
+
static public class SelectTabActionListener extends EventListener<UITabContainer>
{
public void execute(Event<UITabContainer> event) throws Exception
@@ -69,4 +114,67 @@
}
}
}
+
+ public static class MoveLeftActionListener extends EventListener<UITabContainer>
+ {
+ @Override
+ public void execute(Event<UITabContainer> event) throws Exception
+ {
+ UITabContainer container = event.getSource();
+ String objectId = event.getRequestContext().getRequestParameter(OBJECTID);
+ if (container == null || objectId == null)
+ {
+ return;
+ }
+ container.moveTab(container, objectId, true);
+ event.getRequestContext().addUIComponentToUpdateByAjax(container);
+ }
+ }
+
+ public static class MoveRightActionListener extends EventListener<UITabContainer>
+ {
+ @Override
+ public void execute(Event<UITabContainer> event) throws Exception
+ {
+ UITabContainer container = event.getSource();
+ String objectId = event.getRequestContext().getRequestParameter(OBJECTID);
+ if (container == null || objectId == null)
+ {
+ return;
+ }
+ container.moveTab(container, objectId, false);
+ event.getRequestContext().addUIComponentToUpdateByAjax(container);
+ }
+
+ }
+
+ public static class AddTabActionListener extends EventListener<UITabContainer>
+ {
+ @Override
+ public void execute(Event<UITabContainer> event) throws Exception
+ {
+ UITabContainer container = event.getSource();
+ PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
+ if (container == null)
+ {
+ return;
+ }
+ List<UIComponent> children = container.getChildren();
+ for (UIComponent child : children)
+ {
+ if (child.isRendered() && child instanceof UIContainer)
+ {
+ UIContainer newTabContainer = container.addChild(UIContainer.class, null, null);
+ newTabContainer.setTemplate(child.getTemplate());
+ child.setRendered(false);
+ newTabContainer.setRendered(true);
+ newTabContainer.setId(String.valueOf(newTabContainer.hashCode()));
+ newTabContainer.setShowEditControl(true);
+ pcontext.addUIComponentToUpdateByAjax(container);
+ return;
+ }
+ }
+ }
+
+ }
}
13 years, 10 months
gatein SVN: r5944 - portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/application.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2011-02-25 04:49:42 -0500 (Fri, 25 Feb 2011)
New Revision: 5944
Modified:
portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
Log:
GTNPORTAL-1778 Should change message when delete the gadget which removed from Application Registry
Modified: portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-02-25 09:28:53 UTC (rev 5943)
+++ portal/branches/branch-GTNPORTAL-1822/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-02-25 09:49:42 UTC (rev 5944)
@@ -16,14 +16,14 @@
def isDebug = uicomponent.isDebug();
def view = uicomponent.getView();
def userPref = null;
-
+
+ rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget = '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget") + "';");
def isLossData = uicomponent.isLossData();
if(!isLossData) {
url = uicomponent.getUrl();
metadata = uicomponent.getMetadata();
userPref = uicomponent.getUserPref();
jsmanager.importJavascript("eXo.gadget.UIGadget");
- rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget = '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget") + "';");
jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','content-$id', $metadata, $userPref, '$view', '$hostName', " + (isDev ? 1 : 0)
+ ", " + (isDebug ? 1 : 0) + ", " + (noCache ? 1 : 0) + ");");
}
13 years, 10 months
gatein SVN: r5943 - portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2011-02-25 04:28:53 -0500 (Fri, 25 Feb 2011)
New Revision: 5943
Modified:
portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
Log:
GTNPORTAL-1782 Show Permission Setting is empty when add/edit category
Modified: portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2011-02-25 09:10:38 UTC (rev 5942)
+++ portal/branches/branch-GTNPORTAL-1822/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2011-02-25 09:28:53 UTC (rev 5943)
@@ -167,12 +167,13 @@
UIForm uiForm = getAncestorOfType(UIForm.class);
for (UIComponent inputEntry : getChildren())
{
- if (inputEntry instanceof UIFormInputBase)
+ if (inputEntry.isRendered())
{
- if (inputEntry.isRendered())
+ String label = "";
+ boolean hasLabel = false;
+ if (inputEntry instanceof UIFormInputBase)
{
UIFormInputBase formInputBase = (UIFormInputBase) inputEntry;
- String label;
if (formInputBase.getLabel() != null)
{
label = uiForm.getLabel(res, formInputBase.getLabel());
@@ -181,20 +182,24 @@
{
label = uiForm.getLabel(res, formInputBase.getId());
}
- w.write("<tr>");
- w.write("<td class=\"FieldLabel\">");
-
- // if missing resource and the label hasn't been set before, don't print out the label.
if (formInputBase.getLabel() != null || (label != formInputBase.getId()))
{
- w.write(label);
+ hasLabel = true;
}
- w.write("</td>");
- w.write("<td class=\"FieldComponent\">");
- renderUIComponent(formInputBase);
- w.write("</td>");
- w.write("</tr>");
}
+ w.write("<tr>");
+ w.write("<td class=\"FieldLabel\">");
+
+ // if missing resource and the label hasn't been set before, don't print out the label.
+ if (hasLabel)
+ {
+ w.write(label);
+ }
+ w.write("</td>");
+ w.write("<td class=\"FieldComponent\">");
+ renderUIComponent(inputEntry);
+ w.write("</td>");
+ w.write("</tr>");
}
}
w.write("</table>");
13 years, 10 months
gatein SVN: r5941 - maven/parent/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2011-02-25 04:10:30 -0500 (Fri, 25 Feb 2011)
New Revision: 5941
Added:
maven/parent/tags/1.1.0-Beta01/
Log:
[maven-scm] copy for tag 1.1.0-Beta01
13 years, 10 months