Author: kien_nguyen
Date: 2010-06-09 21:52:33 -0400 (Wed, 09 Jun 2010)
New Revision: 3286
Modified:
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_en.properties
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_fr.properties
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_ru.properties
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_uk.properties
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_vi.properties
Log:
GTNPORTAL-1252 Always show message Only alpha, digit, underscore, dash and space
characters allowed in Dashboard pageafter refresh program
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-06-10
01:32:52 UTC (rev 3285)
+++
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-06-10
01:52:33 UTC (rev 3286)
@@ -428,7 +428,14 @@
String newTabLabel = context.getRequestParameter(UIComponent.OBJECTID);
if (!tabPane.validateName(newTabLabel))
{
- context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", null));
+ //TODO nguyenanhkien2a(a)gmail.com
+ //We should redirect to current node while adding new tab fails
+ PageNode currentNode = tabPane.uiPortal.getSelectedNode();
+ PortalRequestContext prContext = Util.getPortalRequestContext();
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
currentNode.getUri());
+
+ Object[] args = {newTabLabel};
+ context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
return;
}
String uri = tabPane.createNewPageNode(newTabLabel);
@@ -463,7 +470,14 @@
String newTabLabel = context.getRequestParameter(RENAMED_TAB_LABEL_PARAMETER);
if (!tabPane.validateName(newTabLabel))
{
- context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", null));
+ //TODO nguyenanhkien2a(a)gmail.com
+ //We should redirect to current node while renaming fails
+ PageNode currentNode = tabPane.uiPortal.getSelectedNode();
+ PortalRequestContext prContext = Util.getPortalRequestContext();
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() +
currentNode.getUri());
+
+ Object[] args = {newTabLabel};
+ context.getUIApplication().addMessage(new
ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
return;
}
String newUri = tabPane.renamePageNode(nodeIndex, newTabLabel);
Modified:
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_en.properties
===================================================================
---
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_en.properties 2010-06-10
01:32:52 UTC (rev 3285)
+++
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_en.properties 2010-06-10
01:52:33 UTC (rev 3286)
@@ -21,4 +21,4 @@
UITabPaneDashboard.action.switchShowRange=Switch Range
UITabPaneDashboard.msg.deleteTab=Really want to remove this dashboard?
UITabPaneDashboard.msg.cannotDeleteLastTab=Can not delete the last tab.
-UITabPaneDashboard.msg.wrongTabName=Only alpha, digit, underscore, dash and space
characters allowed.
\ No newline at end of file
+UITabPaneDashboard.msg.wrongTabName={0}: is invalid; only alpha, digit, underscore, dash
and space characters allowed.
\ No newline at end of file
Modified:
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_fr.properties
===================================================================
---
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_fr.properties 2010-06-10
01:32:52 UTC (rev 3285)
+++
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_fr.properties 2010-06-10
01:52:33 UTC (rev 3286)
@@ -21,4 +21,4 @@
UITabPaneDashboard.action.switchShowRange =Decale
UITabPaneDashboard.msg.deleteTab=Really want to remove this dashboard?
UITabPaneDashboard.msg.cannotDeleteLastTab=Can not delete the last tab.
-UITabPaneDashboard.msg.wrongTabName=Only alpha, digit, underscore, dash and space
characters allowed.
\ No newline at end of file
+UITabPaneDashboard.msg.wrongTabName={0}: is invalid; only alpha, digit, underscore, dash
and space characters allowed.
\ No newline at end of file
Modified:
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_ru.properties
===================================================================
---
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_ru.properties 2010-06-10
01:32:52 UTC (rev 3285)
+++
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_ru.properties 2010-06-10
01:52:33 UTC (rev 3286)
@@ -21,4 +21,4 @@
UITabPaneDashboard.action.switchShowRange=Изменить область
UITabPaneDashboard.msg.deleteTab=Вы действительно хотите удалить эту доску?
UITabPaneDashboard.msg.cannotDeleteLastTab=Can not delete the last tab.
-UITabPaneDashboard.msg.wrongTabName=Only alpha, digit, underscore, dash and space
characters allowed.
\ No newline at end of file
+UITabPaneDashboard.msg.wrongTabName={0}: is invalid; only alpha, digit, underscore, dash
and space characters allowed.
Modified:
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_uk.properties
===================================================================
---
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_uk.properties 2010-06-10
01:32:52 UTC (rev 3285)
+++
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_uk.properties 2010-06-10
01:52:33 UTC (rev 3286)
@@ -21,4 +21,4 @@
UITabPaneDashboard.action.switchShowRange =Перемикач діапазону
UITabPaneDashboard.msg.deleteTab=Really want to remove this dashboard?
UITabPaneDashboard.msg.cannotDeleteLastTab=Can not delete the last tab.
-UITabPaneDashboard.msg.wrongTabName=Only alpha, digit, underscore, dash and space
characters allowed.
\ No newline at end of file
+UITabPaneDashboard.msg.wrongTabName={0}: is invalid; only alpha, digit, underscore, dash
and space characters allowed.
Modified:
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_vi.properties
===================================================================
---
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_vi.properties 2010-06-10
01:32:52 UTC (rev 3285)
+++
portal/trunk/portlet/dashboard/src/main/webapp/WEB-INF/classes/locale/portlet/dashboard/TabbedDashboardPortlet_vi.properties 2010-06-10
01:52:33 UTC (rev 3286)
@@ -21,4 +21,4 @@
UITabPaneDashboard.action.switchShowRange=Switch Range
UITabPaneDashboard.msg.deleteTab=Bạn muốn xóa dashboard này?
UITabPaneDashboard.msg.cannotDeleteLastTab=Không thể xóa tab cuối cùng.
-UITabPaneDashboard.msg.wrongTabName=Chỉ cho phép chữ cái, chữ số, kí tự '_', kí
tự '-' và kí tự cách.
\ No newline at end of file
+UITabPaneDashboard.msg.wrongTabName={0}: không hợp lệ, chỉ cho phép chữ cái, chữ số, kí
tự '_', kí tự '-' và kí tự cách.