gatein SVN: r5149 - exo/portal/branches/3.1.x/component/application-registry/src/main/java/org/exoplatform/application/registry/impl.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-18 02:41:14 -0500 (Thu, 18 Nov 2010)
New Revision: 5149
Modified:
exo/portal/branches/3.1.x/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
Log:
EXOGTN-154 [PLF] Unknown error when editing signed user at Users managemen (see JBEPP-470)
Modified: exo/portal/branches/3.1.x/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- exo/portal/branches/3.1.x/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-11-18 07:38:55 UTC (rev 5148)
+++ exo/portal/branches/3.1.x/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2010-11-18 07:41:14 UTC (rev 5149)
@@ -253,7 +253,17 @@
{
throw new Exception("Invalid Application Id: [" + id + "]");
}
- return getApplication(fragments[0], fragments[1]);
+
+ String category = fragments[0];
+ String applicationName = fragments[1];
+
+ // If the application name contained a beginning slash (which can happen with WSRP), we need to hack around the
+ // hardcoding of portlet id expectations >_<
+ if(fragments.length == 3 && applicationName.length() == 0)
+ {
+ applicationName = "/" + fragments[2];
+ }
+ return getApplication(category, applicationName);
}
public Application getApplication(final String category, final String name) throws Exception
14 years, 2 months
gatein SVN: r5148 - in exo/portal/branches/3.1.x: webui/core/src/main/java/org/exoplatform/webui/application and 2 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-18 02:38:55 -0500 (Thu, 18 Nov 2010)
New Revision: 5148
Modified:
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/WebAppController.java
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
EXOGTN-129: Cannot find the configuration for the component
Modified: exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
--- exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/WebAppController.java 2010-11-18 04:47:59 UTC (rev 5147)
+++ exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/WebAppController.java 2010-11-18 07:38:55 UTC (rev 5148)
@@ -49,7 +49,7 @@
private HashMap<String, Object> attributes_;
- private HashMap<String, Application> applications_;
+ private volatile HashMap<String, Application> applications_;
private HashMap<String, WebRequestHandler> handlers_;
@@ -89,15 +89,37 @@
return applications;
}
- public void removeApplication(String appId)
+ public synchronized void removeApplication(String appId)
{
applications_.remove(appId);
}
- public void addApplication(Application app)
- {
- applications_.put(app.getApplicationId(), app);
- }
+ /**
+ * This methods will add the new application if and only if it hasn't yet
+ * been registered
+ *
+ * @param app
+ * the {@link Application} to add
+ * @return the given application if no application with the same id has been
+ * added otherwise the application already registered
+ */
+ @SuppressWarnings("unchecked")
+ public <T extends Application> T addApplication(T app) {
+ Application result = getApplication(app.getApplicationId());
+ if (result == null) {
+ synchronized (this) {
+ result = getApplication(app.getApplicationId());
+ if (result == null) {
+ HashMap<String, Application> applications = new HashMap<String, Application>(
+ applications_);
+ applications.put(app.getApplicationId(), app);
+ this.applications_ = applications;
+ result = app;
+ }
+ }
+ }
+ return (T) result;
+ }
public void register(WebRequestHandler handler) throws Exception
{
Modified: exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java
===================================================================
--- exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java 2010-11-18 04:47:59 UTC (rev 5147)
+++ exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/ConfigurationManager.java 2010-11-18 07:38:55 UTC (rev 5148)
@@ -19,7 +19,14 @@
package org.exoplatform.webui.application;
-import org.exoplatform.webui.config.*;
+import org.exoplatform.webui.config.Component;
+import org.exoplatform.webui.config.ComponentHandle;
+import org.exoplatform.webui.config.Event;
+import org.exoplatform.webui.config.EventInterceptor;
+import org.exoplatform.webui.config.InitParams;
+import org.exoplatform.webui.config.Param;
+import org.exoplatform.webui.config.Validator;
+import org.exoplatform.webui.config.WebuiConfiguration;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -50,12 +57,7 @@
*/
public class ConfigurationManager
{
- /**
- * todo (julien) : this map should be synchronized somehow
- * <p/>
- * The components of which we manage the configuration
- */
- private Map<String, Component> configs_ = new HashMap<String, Component>();
+ private volatile Map<String, Component> configs_ = new HashMap<String, Component>();
/** The logger. */
private final Logger log;
@@ -106,12 +108,14 @@
*
* @param configs An array of Component
*/
- void setComponentConfigs(Component[] configs)
+ synchronized void setComponentConfigs(Component[] configs)
{
+ Map<String, Component> tmpConfigs = new HashMap<String, Component>(configs_);
for (Component component : configs)
{
- configs_.put(component.getKey(), component);
+ tmpConfigs.put(component.getKey(), component);
}
+ this.configs_ = tmpConfigs;
}
/**
@@ -190,7 +194,17 @@
}
//
- process(type);
+ synchronized (this)
+ {
+ if ((config = configs_.get(key)) == null)
+ {
+ process(type);
+ }
+ else
+ {
+ return config;
+ }
+ }
//
return configs_.get(key);
Modified: exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java
===================================================================
--- exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java 2010-11-18 04:47:59 UTC (rev 5147)
+++ exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java 2010-11-18 07:38:55 UTC (rev 5148)
@@ -130,7 +130,7 @@
{
application = new PortletApplication(getPortletConfig());
application.onInit();
- controller.addApplication(application);
+ application = controller.addApplication(application);
}
return application;
}
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-11-18 04:47:59 UTC (rev 5147)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-11-18 07:38:55 UTC (rev 5148)
@@ -324,7 +324,7 @@
if (model != null)
{
application = GadgetUtil.toGadgetApplication(model);
- webController.addApplication(application);
+ application = webController.addApplication(application);
}
}
return application;
14 years, 2 months
gatein SVN: r5147 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-11-17 23:47:59 -0500 (Wed, 17 Nov 2010)
New Revision: 5147
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_001_AddNewGroupInGroupManagement.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_002_AddNewGroupWithBlankRequireFields.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_003_AddNewGroupWhenNameStartWithNumber.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_004_AddNewGroupWhenGroupNameStartsWithDash.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_006_AddNewGroupWIthNameContainsSpace.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_007_AddNewGroupWhenNameContainsSpecialChars.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_010_AddNewGroupWithLabelLessThan3OrOver30Chars.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_011_AddNewGroupWithDescriptionOver255Chars.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_012_AddNewGroupSameNameWithExisting.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_013_AddNewGroupWhenGroupNameStartsWithDot.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_001_EditGroupWithoutSelectingGroup.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_004_ChangeGoupWithLabelLessThan3OrOver30Chars.html
Log:
TestVN-356:Clean and Improve existing Selenium for GateIn
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_001_AddNewGroupInGroupManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_001_AddNewGroupInGroupManagement.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_001_AddNewGroupInGroupManagement.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -92,6 +92,11 @@
<td>PRL_03_02_001</td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
<td>click</td>
<td>link=Save</td>
<td></td>
@@ -102,6 +107,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[1]</td>
+ <td></td>
+</tr>
+<tr>
<td>click</td>
<td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[1]</td>
<td></td>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_002_AddNewGroupWithBlankRequireFields.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_002_AddNewGroupWithBlankRequireFields.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_002_AddNewGroupWithBlankRequireFields.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -133,12 +133,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
@@ -156,11 +156,6 @@
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>close</td>
- <td></td>
- <td></td>
-</tr>
</tbody></table>
</body>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_003_AddNewGroupWhenNameStartWithNumber.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_003_AddNewGroupWhenNameStartWithNumber.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_003_AddNewGroupWhenNameStartWithNumber.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -138,12 +138,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
<td></td>
</tr>
<tr>
@@ -161,11 +161,6 @@
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>close</td>
- <td></td>
- <td></td>
-</tr>
</tbody></table>
</body>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_004_AddNewGroupWhenGroupNameStartsWithDash.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_004_AddNewGroupWhenGroupNameStartsWithDash.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_004_AddNewGroupWhenGroupNameStartsWithDash.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -143,12 +143,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
@@ -166,11 +166,6 @@
<td>link=Sign out</td>
<td></td>
</tr>
-<tr>
- <td>close</td>
- <td></td>
- <td></td>
-</tr>
</tbody></table>
</body>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_006_AddNewGroupWIthNameContainsSpace.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_006_AddNewGroupWIthNameContainsSpace.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_006_AddNewGroupWIthNameContainsSpace.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -138,12 +138,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_007_AddNewGroupWhenNameContainsSpecialChars.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_007_AddNewGroupWhenNameContainsSpecialChars.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_007_AddNewGroupWhenNameContainsSpecialChars.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -138,12 +138,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_010_AddNewGroupWithLabelLessThan3OrOver30Chars.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_010_AddNewGroupWithLabelLessThan3OrOver30Chars.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_010_AddNewGroupWithLabelLessThan3OrOver30Chars.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -133,12 +133,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
@@ -198,8 +198,8 @@
</tr>
<tr>
<td>waitForTextPresent</td>
- <td>The length of the text in field "Label" must be between "3" and "30" characters.</td>
<td></td>
+ <td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
@@ -207,8 +207,13 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_011_AddNewGroupWithDescriptionOver255Chars.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_011_AddNewGroupWithDescriptionOver255Chars.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_011_AddNewGroupWithDescriptionOver255Chars.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -118,22 +118,22 @@
</tr>
<tr>
<td>waitForTextPresent</td>
- <td>The length of the text in field "Description" must be between "0" and "255" characters. </td>
+ <td>The length of the text in field "Description" must be between "0" and "255" characters.</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
- <td>The length of the text in field "Description" must be between "0" and "255" characters. </td>
+ <td>The length of the text in field "Description" must be between "0" and "255" characters.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_012_AddNewGroupSameNameWithExisting.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_012_AddNewGroupSameNameWithExisting.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_012_AddNewGroupSameNameWithExisting.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -183,22 +183,22 @@
</tr>
<tr>
<td>waitForTextPresent</td>
- <td>This group name already exists, please enter another one </td>
+ <td>This group name already exists, please enter another one</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
- <td>This group name already exists, please enter another one </td>
+ <td>This group name already exists, please enter another one</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_013_AddNewGroupWhenGroupNameStartsWithDot.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_013_AddNewGroupWhenGroupNameStartsWithDot.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_02_013_AddNewGroupWhenGroupNameStartsWithDot.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -143,12 +143,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_001_EditGroupWithoutSelectingGroup.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_001_EditGroupWithoutSelectingGroup.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_001_EditGroupWithoutSelectingGroup.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -103,12 +103,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_004_ChangeGoupWithLabelLessThan3OrOver30Chars.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_004_ChangeGoupWithLabelLessThan3OrOver30Chars.html 2010-11-18 04:16:14 UTC (rev 5146)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_03_03_004_ChangeGoupWithLabelLessThan3OrOver30Chars.html 2010-11-18 04:47:59 UTC (rev 5147)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/" />
-<title>Tét_PRL_03_03_004_EdỉtGoupWithLabelLessThan3OrOver30Chars</title>
+<title>Test_PRL_03_03_004_ChangeGoupWithLabelLessThan3OrOver30Chars</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Tét_PRL_03_03_004_EdỉtGoupWithLabelLessThan3OrOver30Chars</td></tr>
+<tr><td rowspan="1" colspan="3">Test_PRL_03_03_004_ChangeGoupWithLabelLessThan3OrOver30Chars</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -158,22 +158,22 @@
</tr>
<tr>
<td>waitForTextPresent</td>
- <td>The length of the text in field "Label" must be between "3" and "30" characters. </td>
+ <td>The length of the text in field "Label" must be between "3" and "30" characters.</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
- <td>The length of the text in field "Label" must be between "3" and "30" characters. </td>
+ <td>The length of the text in field "Label" must be between "3" and "30" characters.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
@@ -203,22 +203,22 @@
</tr>
<tr>
<td>waitForTextPresent</td>
- <td>The length of the text in field "Label" must be between "3" and "30" characters. </td>
+ <td>The length of the text in field "Label" must be between "3" and "30" characters.</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
- <td>The length of the text in field "Label" must be between "3" and "30" characters. </td>
+ <td>The length of the text in field "Label" must be between "3" and "30" characters.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[2]/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td>//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
<td></td>
</tr>
<tr>
@@ -252,6 +252,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
14 years, 2 months
gatein SVN: r5146 - in exo/portal/branches/3.1.x/webui: eXo/src/main/java/org/exoplatform/webui/organization/account and 1 other directory.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-17 23:16:14 -0500 (Wed, 17 Nov 2010)
New Revision: 5146
Modified:
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
EXOGTN-143 User selection is removed when adding users to group
Modified: exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java
===================================================================
--- exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java 2010-11-18 03:55:40 UTC (rev 5145)
+++ exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java 2010-11-18 04:16:14 UTC (rev 5146)
@@ -19,15 +19,17 @@
package org.exoplatform.webui.core;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.commons.utils.EmptySerializablePageList;
import org.exoplatform.commons.utils.PageList;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
/**
* A component that allows pagination, with an iterator to change pages
@@ -42,6 +44,8 @@
*/
private PageList pageList_ = EmptySerializablePageList.get();
+ private Set<String> selectedItems = new HashSet<String>();
+
public UIPageIterator()
{
}
@@ -95,6 +99,28 @@
{
pageList_.getPage(page);
}
+
+ public void setSelectedItem(String key, boolean value)
+ {
+ if (value == false && this.selectedItems.contains(key))
+ {
+ selectedItems.remove(key);
+ }
+ else if (value)
+ {
+ selectedItems.add(key);
+ }
+ }
+
+ public Set<String> getSelectedItems()
+ {
+ return selectedItems;
+ }
+
+ public boolean isSelectedItem(String key)
+ {
+ return selectedItems.contains(key);
+ }
@SuppressWarnings("unused")
static public class ShowPageActionListener extends EventListener<UIPageIterator>
Modified: exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
--- exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-18 03:55:40 UTC (rev 5145)
+++ exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-18 04:16:14 UTC (rev 5146)
@@ -19,8 +19,11 @@
package org.exoplatform.webui.organization.account;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.commons.utils.ListAccessImpl;
import org.exoplatform.commons.utils.ObjectPageList;
import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.commons.utils.SerializablePageList;
import org.exoplatform.services.organization.MembershipHandler;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.Query;
@@ -38,18 +41,20 @@
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormCheckBoxInput;
import org.exoplatform.webui.form.UIFormSelectBox;
import org.exoplatform.webui.form.UIFormStringInput;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
/**
@@ -70,6 +75,7 @@
@EventConfig(listeners = UIUserSelector.FindGroupActionListener.class, phase = Phase.DECODE),
@EventConfig(listeners = UIUserSelector.ShowPageActionListener.class, phase = Phase.DECODE),
@EventConfig(listeners = UIUserSelector.CloseActionListener.class, phase = Phase.DECODE)})
+@Serialized
public class UIUserSelector extends UIForm implements UIPopupComponent
{
final public static String FIELD_KEYWORD = "Quick Search".intern();
@@ -115,7 +121,7 @@
uiIterator_ = new UIPageIterator();
uiIterator_.setPageList(objPageList);
uiIterator_.setId("UISelectUserPage");
-
+
// create group selector
UIPopupWindow uiPopup = addChild(UIPopupWindow.class, null, "UIPopupGroupSelector");
uiPopup.setWindowSize(540, 0);
@@ -134,8 +140,14 @@
for (Object obj : uiIterator_.getCurrentPageData())
{
User user = (User)obj;
- if (getUIFormCheckBoxInput(user.getUserName()) == null)
- addUIFormInput(new UIFormCheckBoxInput<Boolean>(user.getUserName(), user.getUserName(), false));
+ UIFormCheckBoxInput<Boolean> uiFormCheckBoxInput = getUIFormCheckBoxInput(user.getUserName());
+ if (uiFormCheckBoxInput == null)
+ {
+ uiFormCheckBoxInput = new UIFormCheckBoxInput<Boolean>(user.getUserName(), user.getUserName(), false);
+ addUIFormInput(uiFormCheckBoxInput);
+ }
+
+ uiFormCheckBoxInput.setChecked(uiIterator_.isSelectedItem(user.getUserName()));
}
}
return new ArrayList<User>(uiIterator_.getCurrentPageData());
@@ -290,7 +302,7 @@
}
}
}
- ObjectPageList objPageList = new ObjectPageList(results, 10);
+ PageList objPageList = new SerializablePageList(new ListAccessImpl(User.class, results), 10);
uiIterator_.setPageList(objPageList);
}
@@ -311,31 +323,32 @@
static public class AddActionListener extends EventListener<UIUserSelector>
{
- @SuppressWarnings("unchecked")
public void execute(Event<UIUserSelector> event) throws Exception
{
UIUserSelector uiForm = event.getSource();
StringBuilder sb = new StringBuilder();
- int count = 0;
- for (Object o : uiForm.uiIterator_.getCurrentPageData())
+
+ uiForm.setSelectedItem();
+
+ // get item from selected item map
+ Set<String> items = uiForm.uiIterator_.getSelectedItems();
+ if (items.size() == 0)
{
- User u = (User)o;
- UIFormCheckBoxInput input = uiForm.getUIFormCheckBoxInput(u.getUserName());
- if (input != null && input.isChecked())
- {
- count++;
- if (sb.toString() != null && sb.toString().trim().length() != 0)
- sb.append(",");
- sb.append(u.getUserName());
- }
- }
- if (count == 0)
- {
UIApplication uiApp = uiForm.getAncestorOfType(UIApplication.class);
uiApp.addMessage(new ApplicationMessage("UIUserSelector.msg.user-required", null));
event.getRequestContext().addUIComponentToUpdateByAjax(uiApp.getUIPopupMessages());
return;
}
+ String[] arrItems = items.toArray(new String[items.size()]);
+ Arrays.sort(arrItems);
+
+ for (String key : arrItems)
+ {
+ if (sb.toString() != null && sb.toString().trim().length() != 0)
+ sb.append(",");
+ sb.append(key);
+ }
+
uiForm.setSelectedUsers(sb.toString());
uiForm.<UIComponent> getParent().broadcast(event, event.getExecutionPhase());
}
@@ -375,6 +388,19 @@
{
getUIStringInput(FIELD_KEYWORD).setValue(value);
}
+
+ private void setSelectedItem() throws Exception
+ {
+ for (Object o : this.uiIterator_.getCurrentPageData())
+ {
+ User u = (User) o;
+ UIFormCheckBoxInput input = this.getUIFormCheckBoxInput(u.getUserName());
+ if (input != null)
+ {
+ this.uiIterator_.setSelectedItem(u.getUserName(), input.isChecked());
+ }
+ }
+ }
static public class SelectGroupActionListener extends EventListener<UIGroupSelector>
{
@@ -386,9 +412,7 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
- uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -399,23 +423,17 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
+ uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectUserForm.getApplicationComponent(OrganizationService.class);
-
- PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- if (service.getGroupHandler().findGroupById(groupId) != null)
- {
- users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- }
+ PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ uiSelectUserForm.uiIterator_.setPageList(users);
}
else
{
- users = service.getUserHandler().findUsers(new Query());
+ uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new Query()));
}
- users.setPageSize(10);
- uiSelectUserForm.uiIterator_.setPageList(users);
- uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -461,6 +479,8 @@
public void execute(Event<UIUserSelector> event) throws Exception
{
UIUserSelector uiSelectUserForm = event.getSource();
+ uiSelectUserForm.setSelectedItem();
+
int page = Integer.parseInt(event.getRequestContext().getRequestParameter(OBJECTID));
uiSelectUserForm.updateCurrentPage(page);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
14 years, 2 months
gatein SVN: r5145 - portal/branches/branch-GTNPORTAL-1643/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-17 22:55:40 -0500 (Wed, 17 Nov 2010)
New Revision: 5145
Modified:
portal/branches/branch-GTNPORTAL-1643/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
Log:
GTNPORTAL-1621 RSS gadget displays wrong publish date (fix error syntax)
Modified: portal/branches/branch-GTNPORTAL-1643/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2010-11-18 03:01:56 UTC (rev 5144)
+++ portal/branches/branch-GTNPORTAL-1643/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2010-11-18 03:55:40 UTC (rev 5145)
@@ -43,7 +43,7 @@
if (isNaN(B)) {
return "an indeterminate amount of time ago"
}
- time = (new Date().getTime() 1000 - B) / 1000;
+ time = (new Date().getTime()*1000 - B) / 1000;
if (time < 60) {
return "less than a minute ago"
} else {
14 years, 2 months
gatein SVN: r5144 - exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-17 22:01:56 -0500 (Wed, 17 Nov 2010)
New Revision: 5144
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
Log:
EXOGTN-158 Set language default is empty when create new user and listed in alphabetical order
Modified: exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
===================================================================
--- exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-11-18 02:52:57 UTC (rev 5143)
+++ exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-11-18 03:01:56 UTC (rev 5144)
@@ -20,12 +20,15 @@
package org.exoplatform.webui.organization;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.portal.Constants;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.UserProfile;
import org.exoplatform.services.organization.UserProfileHandler;
import org.exoplatform.services.resources.LocaleConfig;
import org.exoplatform.services.resources.LocaleConfigService;
+import org.exoplatform.services.resources.ResourceBundleService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
@@ -39,9 +42,13 @@
import org.exoplatform.webui.form.UIFormStringInput;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.MissingResourceException;
/**
* Created by The eXo Platform SARL Author : Dang Van Minh minhdv81(a)yahoo.com
@@ -141,7 +148,6 @@
LocaleConfigService localeService = getApplicationComponent(LocaleConfigService.class);
Locale currentLocale = ((PortletRequestContext)WebuiRequestContext.getCurrentInstance()).getLocale();
Iterator<LocaleConfig> i = localeService.getLocalConfigs().iterator();
- String displayLanguage = null;
String displayName = null;
String language = null;
String country = null;
@@ -150,30 +156,46 @@
{
LocaleConfig config = i.next();
Locale locale = config.getLocale();
- displayName = locale.getDisplayName(currentLocale);
+
language = locale.getLanguage();
country = locale.getCountry();
if (country != null && country.length() > 0)
{
- displayLanguage = displayName + " (" + locale.getDisplayCountry(currentLocale) + ")";
language = language + "_" + country;
}
- else
+
+
+ ResourceBundle localeResourceBundle;
+
+ displayName = null;
+ try
{
- displayLanguage = displayName;
+ localeResourceBundle = getResourceBundle(currentLocale);
+ String key = "Locale." + language;
+ String translation = localeResourceBundle.getString(key);
+ displayName = translation;
}
- option = new SelectItemOption<String>(displayLanguage, language, displayName);
+ catch (MissingResourceException e)
+ {
+ displayName = capitalizeFirstLetter(locale.getDisplayName(currentLocale));
+ }
+ catch (Exception e)
+ {
+
+ }
+
+ option = new SelectItemOption<String>(displayName, language);
if (language.equals(selectedLang))
{
option.setSelected(true);
}
- if (config.getLanguage().equals("en"))
- {
- lang.add(0, option);
- continue;
- }
lang.add(option);
}
+
+ // Set default language for new user is empty
+ lang.add(new SelectItemOption<String>("", ""));
+
+ Collections.sort(lang, new LanguagesComparator());
langSelectBox.setOptions(lang);
}
@@ -242,5 +264,36 @@
}
uiApp.addMessage(new ApplicationMessage("UIUserProfileInputSet.msg.sucsesful.update.userprofile", args));
}
+
+ private String capitalizeFirstLetter(String word)
+ {
+ if (word == null)
+ {
+ return null;
+ }
+ if (word.length() == 0)
+ {
+ return word;
+ }
+ StringBuilder result = new StringBuilder(word);
+ result.replace(0, 1, result.substring(0, 1).toUpperCase());
+ return result.toString();
+ }
+ private ResourceBundle getResourceBundle(Locale locale) throws Exception
+ {
+ ExoContainer appContainer = ExoContainerContext.getCurrentContainer();
+ ResourceBundleService service =
+ (ResourceBundleService)appContainer.getComponentInstanceOfType(ResourceBundleService.class);
+ ResourceBundle res = service.getResourceBundle("locale.portal.webui", locale);
+ return res;
+ }
+
+ private class LanguagesComparator implements Comparator<SelectItemOption>
+ {
+ public int compare(SelectItemOption item0, SelectItemOption item1)
+ {
+ return item0.getLabel().compareToIgnoreCase(item1.getLabel());
+ }
+ }
}
14 years, 2 months
gatein SVN: r5143 - portal/branches/branch-GTNPORTAL-1643/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-17 21:52:57 -0500 (Wed, 17 Nov 2010)
New Revision: 5143
Modified:
portal/branches/branch-GTNPORTAL-1643/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl
Log:
GTNPORTAL-908 Page to add widget to categories is visually broken on Chrome (remove remaining code, because it affect to add a gadget to catagory if we are having too many gadgets, catagory screen will be down to bottom of page)
Modified: portal/branches/branch-GTNPORTAL-1643/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl 2010-11-18 02:18:28 UTC (rev 5142)
+++ portal/branches/branch-GTNPORTAL-1643/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl 2010-11-18 02:52:57 UTC (rev 5143)
@@ -24,7 +24,7 @@
<div class="Refresh16x16Icon ControlIcon" title="<%=_ctx.appRes("UIGadgetInfo.title.refresh")%>" onclick="<%= uicomponent.event("Refresh") %>"><span></span></div>
<div class="ClearBoth"><span></span></div>
</div>
- <div class="Application ClearFix">
+ <div class="Application">
<div class="PortletIcons">
<img src="$gadgetThumbnail" onError="src='$srcBGError'" alt=""/>
</div>
14 years, 2 months
gatein SVN: r5142 - portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-11-17 21:18:28 -0500 (Wed, 17 Nov 2010)
New Revision: 5142
Modified:
portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
GTNPORTAL-1514 Kept old search result when search user with wrong path
Modified: portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-17 11:56:55 UTC (rev 5141)
+++ portal/branches/branch-GTNPORTAL-1643/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-18 02:18:28 UTC (rev 5142)
@@ -412,7 +412,9 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -423,17 +425,23 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
- uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectUserForm.getApplicationComponent(OrganizationService.class);
+
+ PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- uiSelectUserForm.uiIterator_.setPageList(users);
+ if (service.getGroupHandler().findGroupById(groupId) != null)
+ {
+ users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ }
}
else
{
- uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new Query()));
+ users = service.getUserHandler().findUsers(new Query());
}
+ users.setPageSize(10);
+ uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
14 years, 2 months
gatein SVN: r5141 - exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-11-17 06:56:55 -0500 (Wed, 17 Nov 2010)
New Revision: 5141
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
EXOGTN-90 Kept old search result when search user with wrong path
Modified: exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
--- exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-17 11:40:05 UTC (rev 5140)
+++ exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-17 11:56:55 UTC (rev 5141)
@@ -386,7 +386,9 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -397,17 +399,23 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
- uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectUserForm.getApplicationComponent(OrganizationService.class);
+
+ PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- uiSelectUserForm.uiIterator_.setPageList(users);
+ if (service.getGroupHandler().findGroupById(groupId) != null)
+ {
+ users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ }
}
else
{
- uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new Query()));
+ users = service.getUserHandler().findUsers(new Query());
}
+ users.setPageSize(10);
+ uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
14 years, 2 months
gatein SVN: r5140 - epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-11-17 06:40:05 -0500 (Wed, 17 Nov 2010)
New Revision: 5140
Modified:
epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml
epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Book_Info.xml
epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Revision_History.xml
Log:
JBEPP-603: Updated for Beta staging
Modified: epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml 2010-11-17 11:23:00 UTC (rev 5139)
+++ epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/5.1.0_Release_Notes.xml 2010-11-17 11:40:05 UTC (rev 5140)
@@ -233,7 +233,7 @@
<para>
The following is a list of issues fixed in this release:
</para>
- <!-- Commented out for current release. Retaining the text to be reused in future release drafts. -->
+ <!-- Commented out for current release. Retaining the text to be reused in future release drafts.
<warning>
<title>Draft Content!</title>
<para>
@@ -242,7 +242,7 @@
<para>
<emphasis role="bold">They are likely not technically correct at the moment</emphasis>, but they will serve as a basis and will be corrected in subsequent iterations after technical and QE reviews.
</para>
- </warning>
+ </warning> -->
<variablelist>
<title><emphasis role="bold">Issues fixed in the product:</emphasis></title>
<varlistentry>
@@ -279,7 +279,7 @@
A naming duplication in the pre-packaged "Simplest Hello World" and "IDM Hello World" portlet examples caused an Illegal Argument Exception when both of the portlet examples were deployed.
</para>
<para>
- The isses was resolved by renaming the xxxx portlet to yyyy.
+ The isses was resolved.
</para>
</listitem>
</varlistentry>
@@ -609,12 +609,12 @@
<para>
Customers should be aware that passwords entered into the portal login form and submitted with the <emphasis>Remember me</emphasis> option are stored in the JCR database in plain text. This presents a possible security vulnerability.
</para>
- <important>
+ <!-- <important>
<title><emphasis role="bold"></emphasis></title>
<para>
As yet there is no workaround/solution to this security issue.
</para>
- </important>
+ </important> -->
</listitem>
</varlistentry>
<varlistentry>
@@ -623,12 +623,9 @@
<para>
An issue has been reported about EPP caching recently changed passwords. After a user changes their password, both the old and new password will allow them to log into the portal. This situation persists until the portal is restarted.
</para>
- <important>
- <title><emphasis role="bold">DOC NOTE</emphasis></title>
- <para>
- As yet there is no workaround/solution to this security issue.
- </para>
- </important>
+ <para>
+ Disable LDAP connection pooling to avoid this issue.
+ </para>
</listitem>
</varlistentry>
</variablelist>
Modified: epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Book_Info.xml 2010-11-17 11:23:00 UTC (rev 5139)
+++ epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Book_Info.xml 2010-11-17 11:40:05 UTC (rev 5140)
@@ -7,7 +7,7 @@
<title>5.1.0 Release Notes</title>
<subtitle>For use with JBoss Enterprise Portal Platform 5.1.0</subtitle>
<edition>1</edition>
- <pubsnumber>1.3</pubsnumber>
+ <pubsnumber>1.4</pubsnumber>
<productname>JBoss Enterprise Portal Platform</productname>
<productnumber>5</productnumber>
<abstract>
Modified: epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Revision_History.xml 2010-11-17 11:23:00 UTC (rev 5139)
+++ epp/docs/branches/EPP_5_1_Branch/Release_Notes/en-US/Revision_History.xml 2010-11-17 11:40:05 UTC (rev 5140)
@@ -6,17 +6,31 @@
<appendix id="appe-5.1.0_Release_Notes-Revision_History">
<title>Revision History</title>
<simpara>
- <revhistory>
- <revision>
- <revnumber>1-1.3</revnumber>
- <date>Wed Nov 10 2010</date>
- <author>
+ <revhistory>
+ <revision>
+ <revnumber>1-1.4</revnumber>
+ <date>Wed Nov 10 2010</date>
+ <author>
<firstname>Scott</firstname>
<surname>Mumford</surname>
<email>smumford(a)redhat.com</email>
</author>
<revdescription>
<simplelist>
+ <member>Updated component list.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>1-1.3</revnumber>
+ <date>Wed Nov 10 2010</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email>smumford(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
<member>Added more JIRA descriptions.</member>
<member>Split 'Issues Fixed' into Product, Upstream and New Features lists</member>
</simplelist>
14 years, 2 months