Author: ndkhoiits
Date: 2010-05-21 03:06:30 -0400 (Fri, 21 May 2010)
New Revision: 3164
Modified:
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
Log:
GTNPORTAL-1237 Check tab name if has space only
Modified:
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
---
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-05-21
07:05:11 UTC (rev 3163)
+++
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-05-21
07:06:30 UTC (rev 3164)
@@ -292,7 +292,7 @@
return false;
}
label = label.trim();
- if (Character.isDigit(label.charAt(0)) || label.charAt(0) == '-')
+ if (label.length() < 1 || Character.isDigit(label.charAt(0)) || label.charAt(0)
== '-')
{
return false;
}
@@ -463,7 +463,7 @@
String newTabLabel = context.getRequestParameter(RENAMED_TAB_LABEL_PARAMETER);
if (!tabPane.validateName(newTabLabel))
{
- context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", null));
+ context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", null,
ApplicationMessage.ERROR));
return;
}
String newUri = tabPane.renamePageNode(nodeIndex, newTabLabel);
Show replies by date