Added new alert management view implementation.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Fri, 25 Mar 2011 10:47:27 +0100
changeset 11367 a64a4edec787
parent 11366 9e1bf405c596
child 11368 1da3c01983e3
Added new alert management view implementation.

This view replaces old alert management form.
Fixes issue 3415
Fixes issue 16476
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TREENODE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/OBUIAPP_VIEW_IMPL.xml
modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertManagementActionHandler.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-management-view.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-alert-manager.js
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml	Fri Mar 25 10:34:18 2011 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml	Fri Mar 25 10:47:27 2011 +0100
@@ -26,4 +26,16 @@
 <!--B487FABEB36F45C28E22CD309914FD71-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--B487FABEB36F45C28E22CD309914FD71--></AD_MENU>
 
+<!--FF8080812EB90459012EBA72B4E7004D--><AD_MENU>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <AD_MENU_ID><![CDATA[FF8080812EB90459012EBA72B4E7004D]]></AD_MENU_ID>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <NAME><![CDATA[Alert Management]]></NAME>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <ACTION><![CDATA[OBUIAPP_OpenView]]></ACTION>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <EM_OBUIAPP_VIEW_IMPL_ID><![CDATA[FF8080812EB90459012EBA225DDB0029]]></EM_OBUIAPP_VIEW_IMPL_ID>
+<!--FF8080812EB90459012EBA72B4E7004D--></AD_MENU>
+
 </data>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Mar 25 10:34:18 2011 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Mar 25 10:47:27 2011 +0100
@@ -761,6 +761,94 @@
 <!--FF8080812E8126B7012E8134F22F0013-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--FF8080812E8126B7012E8134F22F0013--></AD_MESSAGE>
 
+<!--FF8080812EDE8228012EE38964E00054--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38964E00054-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38964E00054]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38964E00054-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38964E00054-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38964E00054-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38964E00054-->  <VALUE><![CDATA[OBUIAPP_AlertSectionHeader]]></VALUE>
+<!--FF8080812EDE8228012EE38964E00054-->  <MSGTEXT><![CDATA[%0 (%1)]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38964E00054-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38964E00054-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38964E00054--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38B157A005C--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38B157A005C-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38B157A005C]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38B157A005C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38B157A005C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38B157A005C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38B157A005C-->  <VALUE><![CDATA[OBUIAPP_MoveSelectedToStatus]]></VALUE>
+<!--FF8080812EDE8228012EE38B157A005C-->  <MSGTEXT><![CDATA[[Move selected to %0]]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38B157A005C-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38B157A005C-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38B157A005C--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38C83950064--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38C83950064-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38C83950064]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38C83950064-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38C83950064-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38C83950064-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38C83950064-->  <VALUE><![CDATA[OBUIAPP_AlertGrid_AlertRule]]></VALUE>
+<!--FF8080812EDE8228012EE38C83950064-->  <MSGTEXT><![CDATA[Alert Rule]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38C83950064-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38C83950064-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38C83950064--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38CD7B70069--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38CD7B70069]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <VALUE><![CDATA[OBUIAPP_AlertGrid_Alert]]></VALUE>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <MSGTEXT><![CDATA[Alert]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38CD7B70069-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38CD7B70069--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38D27B2006F--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38D27B2006F]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <VALUE><![CDATA[OBUIAPP_AlertGrid_Time]]></VALUE>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <MSGTEXT><![CDATA[Time]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38D27B2006F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38D27B2006F--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38D601B0074--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38D601B0074-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38D601B0074]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38D601B0074-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38D601B0074-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38D601B0074-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38D601B0074-->  <VALUE><![CDATA[OBUIAPP_AlertGrid_Note]]></VALUE>
+<!--FF8080812EDE8228012EE38D601B0074-->  <MSGTEXT><![CDATA[Note]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38D601B0074-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38D601B0074-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38D601B0074--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38DA0290079--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38DA0290079-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38DA0290079]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38DA0290079-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38DA0290079-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38DA0290079-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38DA0290079-->  <VALUE><![CDATA[OBUIAPP_AlertGrid_Record]]></VALUE>
+<!--FF8080812EDE8228012EE38DA0290079-->  <MSGTEXT><![CDATA[Record]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38DA0290079-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38DA0290079-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38DA0290079--></AD_MESSAGE>
+
+<!--FF8080812EDE8228012EE38E0C69007E--><AD_MESSAGE>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <AD_MESSAGE_ID><![CDATA[FF8080812EDE8228012EE38E0C69007E]]></AD_MESSAGE_ID>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <VALUE><![CDATA[OBUIAPP_MoveToStatus]]></VALUE>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <MSGTEXT><![CDATA[Move to %0]]></MSGTEXT>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--FF8080812EDE8228012EE38E0C69007E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EDE8228012EE38E0C69007E--></AD_MESSAGE>
+
 <!--FF8081812D6761CF012D676DF2A70045--><AD_MESSAGE>
 <!--FF8081812D6761CF012D676DF2A70045-->  <AD_MESSAGE_ID><![CDATA[FF8081812D6761CF012D676DF2A70045]]></AD_MESSAGE_ID>
 <!--FF8081812D6761CF012D676DF2A70045-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TREENODE.xml	Fri Mar 25 10:34:18 2011 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TREENODE.xml	Fri Mar 25 10:47:27 2011 +0100
@@ -22,4 +22,15 @@
 <!--8AB1608C49C946D99AFB540DD2EE3543-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--8AB1608C49C946D99AFB540DD2EE3543--></AD_TREENODE>
 
+<!--9E88163FFD3D4B41E040007F01005CF5--><AD_TREENODE>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <AD_TREENODE_ID><![CDATA[9E88163FFD3D4B41E040007F01005CF5]]></AD_TREENODE_ID>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <AD_TREE_ID><![CDATA[10]]></AD_TREE_ID>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <NODE_ID><![CDATA[FF8080812EB90459012EBA72B4E7004D]]></NODE_ID>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <PARENT_ID><![CDATA[161]]></PARENT_ID>
+<!--9E88163FFD3D4B41E040007F01005CF5-->  <SEQNO><![CDATA[280]]></SEQNO>
+<!--9E88163FFD3D4B41E040007F01005CF5--></AD_TREENODE>
+
 </data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/OBUIAPP_VIEW_IMPL.xml	Fri Mar 25 10:47:27 2011 +0100
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--FF8080812EB90459012EBA225DDB0029--><OBUIAPP_VIEW_IMPL>
+<!--FF8080812EB90459012EBA225DDB0029-->  <OBUIAPP_VIEW_IMPL_ID><![CDATA[FF8080812EB90459012EBA225DDB0029]]></OBUIAPP_VIEW_IMPL_ID>
+<!--FF8080812EB90459012EBA225DDB0029-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812EB90459012EBA225DDB0029-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812EB90459012EBA225DDB0029-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EB90459012EBA225DDB0029-->  <NAME><![CDATA[OBUIAPP_AlertManagement]]></NAME>
+<!--FF8080812EB90459012EBA225DDB0029-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812EB90459012EBA225DDB0029--></OBUIAPP_VIEW_IMPL>
+
+</data>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Fri Mar 25 10:34:18 2011 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Fri Mar 25 10:47:27 2011 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2011 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -97,10 +97,10 @@
         final AlertRule alertRule = (AlertRule) o;
         final String whereClause = new UsedByLink().getWhereClause(vars, "", alertRule
             .getFilterClause() == null ? "" : alertRule.getFilterClause());
-        final String sql = "select * from AD_ALERT where ISACTIVE='Y'" + " AND ISFIXED ='N'"
-            + " AND AD_CLIENT_ID " + OBDal.getInstance().getReadableClientsInClause()
-            + " AND AD_ORG_ID " + OBDal.getInstance().getReadableOrganizationsInClause()
-            + " AND AD_ALERTRULE_ID = ? " + (whereClause == null ? "" : whereClause);
+        final String sql = "select * from AD_ALERT where STATUS='NEW'" + " AND AD_CLIENT_ID "
+            + OBDal.getInstance().getReadableClientsInClause() + " AND AD_ORG_ID "
+            + OBDal.getInstance().getReadableOrganizationsInClause() + " AND AD_ALERTRULE_ID = ? "
+            + (whereClause == null ? "" : whereClause);
         final SQLQuery sqlQuery = OBDal.getInstance().getSession().createSQLQuery(sql).addEntity(
             Alert.ENTITY_NAME);
         sqlQuery.setParameter(0, alertRule.getId());
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertManagementActionHandler.java	Fri Mar 25 10:47:27 2011 +0100
@@ -0,0 +1,166 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.client.application;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.servlet.ServletException;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.hibernate.SQLQuery;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBDao;
+import org.openbravo.dal.service.OBQuery;
+import org.openbravo.erpCommon.utility.UsedByLink;
+import org.openbravo.model.ad.alert.Alert;
+import org.openbravo.model.ad.alert.AlertRecipient;
+import org.openbravo.model.ad.alert.AlertRule;
+
+/**
+ * @author gorkaion
+ * 
+ */
+@ApplicationScoped
+public class AlertManagementActionHandler extends BaseActionHandler {
+  private static final Logger log = Logger.getLogger(AlertManagementActionHandler.class);
+  private static final String GET_ALERT_RULES = "getAlertRules";
+  private static final String MOVE_TO_STATUS = "moveToStatus";
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.openbravo.client.kernel.BaseActionHandler#execute(java.util.Map, java.lang.String)
+   */
+  @Override
+  protected JSONObject execute(Map<String, Object> parameters, String content) {
+    JSONObject object = new JSONObject();
+
+    OBContext.setAdminMode();
+    try {
+      JSONObject o = new JSONObject(content);
+      final String strEventType = o.getString("eventType");
+      if (GET_ALERT_RULES.equals(strEventType)) {
+        object.put("alertRules", getAlertRules());
+      } else if (MOVE_TO_STATUS.equals(strEventType)) {
+        final String alertIDs = o.getString("alertIDs");
+        final String oldStatus = o.getString("oldStatus");
+        final String newStatus = o.getString("newStatus");
+        setNewStatus(alertIDs, newStatus);
+        object.put("oldStatus", oldStatus);
+        object.put("newStatus", newStatus);
+      } else {
+        log.error("Unsupported event type: " + strEventType);
+      }
+
+    } catch (JSONException e) {
+      log.error("Error executing action: " + e.getMessage(), e);
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+
+    return object;
+  }
+
+  private JSONArray getAlertRules() {
+    // Get alert rules visible for context's the role/user.
+    StringBuffer whereClause = new StringBuffer();
+    whereClause.append(" as ar ");
+    whereClause.append("\nwhere exists (select 1 from ar."
+        + AlertRule.PROPERTY_ADALERTRECIPIENTLIST + " as arr");
+    whereClause.append("\n    where arr." + AlertRecipient.PROPERTY_USERCONTACT + ".id = :user");
+    whereClause.append("\n      or (");
+    whereClause.append("arr." + AlertRecipient.PROPERTY_USERCONTACT + " is null");
+    whereClause.append("\n          and arr." + AlertRecipient.PROPERTY_ROLE + ".id = :role))");
+
+    OBQuery<AlertRule> alertRulesQuery = OBDal.getInstance().createQuery(AlertRule.class,
+        whereClause.toString());
+    alertRulesQuery.setNamedParameter("user", OBContext.getOBContext().getUser().getId());
+    alertRulesQuery.setNamedParameter("role", OBContext.getOBContext().getRole().getId());
+
+    JSONArray alertRules = new JSONArray();
+    try {
+      if (alertRulesQuery.count() > 0) {
+        for (AlertRule alertRule : alertRulesQuery.list()) {
+          JSONObject alertRuleJson = new JSONObject();
+          alertRuleJson.put("name", alertRule.getIdentifier());
+          alertRuleJson.put("alertRuleId", alertRule.getId());
+          alertRuleJson.put("tabId", alertRule.getTab().getId());
+          String filterClause = null;
+          if (alertRule.getFilterClause() != null) {
+            try {
+              filterClause = new UsedByLink().getWhereClause(RequestContext.get()
+                  .getVariablesSecureApp(), "", alertRule.getFilterClause());
+            } catch (ServletException e) {
+              throw new IllegalStateException(e);
+            }
+            final String sql = "select * from AD_ALERT where ISACTIVE='Y'" + " AND ISFIXED ='N'"
+                + " AND AD_CLIENT_ID " + OBDal.getInstance().getReadableClientsInClause()
+                + " AND AD_ORG_ID " + OBDal.getInstance().getReadableOrganizationsInClause()
+                + " AND AD_ALERTRULE_ID = ? " + (filterClause == null ? "" : filterClause);
+            final SQLQuery sqlQuery = OBDal.getInstance().getSession().createSQLQuery(sql)
+                .addEntity(Alert.ENTITY_NAME);
+            sqlQuery.setParameter(0, alertRule.getId());
+            // It is not possible to add an SQL filter clause to the grid's default datasource.
+            // A String with the alert_id's to filter the grid's so only alerts with access are
+            // shown.
+            if (sqlQuery.list().size() > 0) {
+              String filterAlerts = "";
+              @SuppressWarnings("unchecked")
+              List<Alert> alerts = sqlQuery.list();
+              for (Alert alert : alerts) {
+                if (!filterAlerts.isEmpty()) {
+                  filterAlerts += ", ";
+                }
+                filterAlerts += "'" + alert.getId() + "'";
+              }
+              alertRuleJson.put("alerts", filterAlerts);
+            }
+          }
+
+          alertRules.put(alertRuleJson);
+        }
+      }
+    } catch (JSONException e) {
+      log.error("Error executing action: " + e.getMessage(), e);
+    }
+
+    return alertRules;
+  }
+
+  private void setNewStatus(String alertIDs, String newStatus) {
+    if (StringUtils.isEmpty(alertIDs)) {
+      return;
+    }
+    List<Alert> alerts = OBDao.getOBObjectListFromString(Alert.class, alertIDs);
+    for (Alert alert : alerts) {
+      alert.setAlertStatus(newStatus.toUpperCase());
+      OBDal.getInstance().save(alert);
+    }
+    OBDal.getInstance().flush();
+  }
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Fri Mar 25 10:34:18 2011 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Fri Mar 25 10:47:27 2011 +0100
@@ -152,6 +152,8 @@
         "web/org.openbravo.client.application/js/ob-action-button.js", false));
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/ob-eventhandler.js", false));
+    globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/ob-section-stack.js", false));
 
     // Styling
     globalResources.add(createStyleSheetResource(
@@ -256,6 +258,13 @@
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/ob-history-manager.js", false));
 
+    // Alert Management
+    globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js", false));
+    globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/alert-management/ob-alert-management-view.js",
+        false));
+
     return globalResources;
   }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js	Fri Mar 25 10:47:27 2011 +0100
@@ -0,0 +1,278 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use. this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+isc.ClassFactory.defineClass('OBAlertGrid', isc.OBGrid);
+isc.OBAlertGrid.addProperties({
+  alertStatus: null,
+
+  width: '100%',
+  height: '100%',
+  dataSource: null,
+  canEdit: true,
+  alternateRecordStyles: true,
+  showFilterEditor: true,
+  canReorderFields: false,
+  canFreezeFields: false,
+  canGroupBy: false,
+  canAutoFitFields: false,
+  selectionType: 'simple',
+  editEvent: 'click',
+  //editOnFocus: true,
+  showCellContextMenus: true,
+
+  dataProperties: {
+    useClientFiltering: false//,
+    //useClientSorting: false
+  },
+  
+  gridFields: [
+    { name: 'alertRule',
+      title: OB.I18N.getLabel('OBUIAPP_AlertGrid_AlertRule'),
+      displayField: 'alertRule._identifier',
+      canFilter: true,
+      canEdit: false,
+      filterOnKeypress: true,
+      filterEditorType: 'OBFKFilterTextItem',
+      type: '_id_19'
+    },
+    { name: 'description',
+      title: OB.I18N.getLabel('OBUIAPP_AlertGrid_Alert'),
+      canFilter: true,
+      canEdit: false,
+      filterOnKeypress: true,
+      filterEditorType: 'OBTextItem'
+        //, type: '_id_10'
+    },
+    { name: 'creationDate',
+      title: OB.I18N.getLabel('OBUIAPP_AlertGrid_Time'),
+      canFilter: true,
+      canEdit: false,
+      filterEditorType: 'OBMiniDateRangeItem',
+      type: '_id_16'
+    },
+    { name: 'comments',
+      title: OB.I18N.getLabel('OBUIAPP_AlertGrid_Note'),
+      canFilter: true,
+      canEdit: true,
+      filterOnKeypress: true,
+      filterEditorType: 'OBTextItem',
+      editorType: 'OBTextItem',
+      editorProperties: {
+        width: '90%',
+        columnName: 'comments',
+        disabled: false,
+        updatable: true
+      }
+      //, type: '_id_10'
+    },
+    { name: 'recordID',
+      title: OB.I18N.getLabel('OBUIAPP_AlertGrid_Record'),
+      canFilter: true,
+      canEdit: false,
+      isLink: true,
+      filterOnKeypress: true,
+      filterEditorType: 'OBTextItem'
+      //, type: '_id_10'
+    }
+    ],
+  
+  initWidget: function() {
+    // added for showing counts in the filtereditor row
+    this.checkboxFieldDefaults = isc.addProperties(this.checkboxFieldDefaults, {
+      canFilter: true,
+      frozen: true,
+      canFreeze: true,
+      showHover: true,
+      prompt: OB.I18N.getLabel('OBUIAPP_GridSelectAllColumnPrompt'),
+      filterEditorProperties: {
+        textAlign: 'center'
+      },
+      filterEditorType: 'StaticTextItem'
+    });
+
+    this.contextMenu = this.getMenuConstructor().create({items: []});
+    
+    OB.Datasource.get('ADAlert', this);
+    
+    this.Super('initWidget', arguments);
+  },
+  
+  setDataSource: function() {
+    this.Super('setDataSource', arguments);
+    // Some properties need to be set when the datasource is loaded to avoid errors when form is
+    // open the first time.
+    this.setFields(this.gridFields);
+    this.setSelectionAppearance('checkbox');
+    this.sort('creationDate', 'descending');
+
+    this.fetchData();
+  },
+  
+  dataArrived: function(startRow, endRow){
+    this.getGridTotalRows();
+    return this.Super('dataArrived', arguments);
+  },
+
+  getGridTotalRows: function(){
+    var criteria = this.getCriteria() || {}, requestProperties = {};
+
+    if (this.isGridFiltered(criteria) || !OB.AlertManagement.sections[this.alertStatus].expanded) {
+      // fetch to the datasource with an empty criteria to get all the rows
+      requestProperties.params = requestProperties.params || {};
+      requestProperties.params[OB.Constants.WHERE_PARAMETER] = this.getFilterClause();
+      requestProperties.clientContext = {alertStatus: this.alertStatus};
+      this.dataSource.fetchData({}, function(dsResponse, data, dsRequest){
+          OB.AlertManagement.setTotalRows(dsResponse.totalRows, dsResponse.clientContext.alertStatus);
+        }, requestProperties );
+
+    } else {
+      OB.AlertManagement.setTotalRows(this.data.totalRows, this.alertStatus);
+    }
+  },
+  
+  clearFilter: function(){
+    delete this.filterClause;
+    this.filterEditor.getEditForm().clearValues();
+    this.filterEditor.performAction();
+  },
+  
+  onFetchData: function(criteria, requestProperties){
+    requestProperties = requestProperties || {};
+    requestProperties.params = requestProperties.params || {};
+
+    requestProperties.params[OB.Constants.WHERE_PARAMETER] = this.getFilterClause();
+  },
+  
+  getFilterClause: function() {
+    var i, filterClause = '',
+        alertRuleIds = '',
+        arlength = OB.AlertManagement.alertRules.length,
+        whereClause = 'status = upper(\'' + this.alertStatus + '\')';
+
+    for (i = 0; i < arlength; i++) {
+      if (alertRuleIds !== '') {
+        alertRuleIds += ',';
+      }
+      alertRuleIds += '\'' + OB.AlertManagement.alertRules[i].alertRuleId +'\'';
+      // if an alertRule has some alerts to filter by, add them to the where clause as:
+      // alerts are of a different alertRule or only the alerts predefined
+      // this only happens if the alertRule has an SQL filter expression defined
+      if (OB.AlertManagement.alertRules[i].alerts) {
+        filterClause += ' and (e.alertRule.id != \'' + OB.AlertManagement.alertRules[i].alertRuleId + '\'';
+        filterClause += ' or e.id in (' +OB.AlertManagement.alertRules[i].alerts + '))';
+      }
+    }
+    whereClause += ' and alertRule.id in (' + alertRuleIds + ')';
+    if (filterClause !== '') {
+      whereClause += filterClause;
+    }
+    return whereClause;
+  },
+  
+  cellClick: function (record, rowNum, colNum) {
+    var i, tabId, field = this.getField(colNum);
+    for (i = 0; i < OB.AlertManagement.alertRules.length; i++) {
+      if (OB.AlertManagement.alertRules[i].alertRuleId === record.alertRule) {
+        tabId = OB.AlertManagement.alertRules[i].tabId;
+      }
+    }
+    if (field.isLink && tabId) {
+      OB.Utilities.openDirectTab(tabId, record.referenceSearchKey);
+    }
+  },
+  
+  // Prevents empty message to be shown in frozen part
+  // http://forums.smartclient.com/showthread.php?p=57581
+  createBodies: function(){
+    var ret = this.Super('createBodies', arguments);
+    if (this.frozenBody) {
+      this.frozenBody.showEmptyMessage = false;
+    }
+    return ret;
+  },
+  
+  selectionChanged: function(record, state){
+    this.updateSelectedCountDisplay();
+    this.Super('selectionChanged', arguments);
+  },
+  
+  updateSelectedCountDisplay: function(){
+    var selection = this.getSelection();
+    var selectionLength = selection.getLength();
+    var newValue = '&nbsp;';
+    if (selectionLength > 0) {
+      newValue = selectionLength + '';
+    }
+    if (this.filterEditor) {
+      this.filterEditor.getEditForm().setValue(this.getCheckboxField().name, newValue);
+    }
+  },
+  
+  // overridden to support hover on the header for the checkbox field
+  setFieldProperties: function(field, properties){
+    var localField = field;
+    if (isc.isA.Number(localField)) {
+      localField = this.fields[localField];
+    }
+    if (this.isCheckboxField(localField) && properties) {
+      properties.showHover = true;
+      properties.prompt = OB.I18N.getLabel('OBUIAPP_GridSelectAllColumnPrompt');
+    }
+    
+    return this.Super('setFieldProperties', arguments);
+  },
+  
+  cellHoverHTML: function(record, rowNum, colNum){
+    var field = this.getField(colNum), cellErrors, msg = '', i;
+    if (this.isCheckboxField(field)) {
+      return OB.I18N.getLabel('OBUIAPP_GridSelectColumnPrompt');
+    }
+  },
+  
+  makeCellContextItems: function(record, rowNum, colNum){
+    var menuItems = [];
+    var grid = this;
+    if (grid.alertStatus === 'Acknowledged' || grid.alertStatus === 'Suppressed') {
+      menuItems.add({
+        title: OB.I18N.getLabel('OBUIAPP_MoveToStatus', ['New']),
+        click: function(){
+          OB.AlertManagement.moveToStatus(record.id, grid.alertStatus, 'New');
+        }
+      });
+    }
+    if (grid.alertStatus === 'New' || grid.alertStatus === 'Suppressed') {
+      menuItems.add({
+        title: OB.I18N.getLabel('OBUIAPP_MoveToStatus', ['Acknowledged']),
+        click: function(){
+          OB.AlertManagement.moveToStatus(record.id, grid.alertStatus, 'Acknowledged');
+        }
+      });
+    }
+    if (grid.alertStatus === 'New' || grid.alertStatus === 'Acknowledged') {
+      menuItems.add({
+        title: OB.I18N.getLabel('OBUIAPP_MoveToStatus', ['Suppressed']),
+        click: function(){
+          OB.AlertManagement.moveToStatus(record.id, grid.alertStatus, 'Suppressed');
+        }
+      });
+    }
+    return menuItems;
+  }
+
+});
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-management-view.js	Fri Mar 25 10:47:27 2011 +0100
@@ -0,0 +1,170 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use. this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+isc.ClassFactory.defineClass('OBUIAPP_AlertManagement', isc.VLayout);
+isc.OBUIAPP_AlertManagement.addProperties({
+  // Allow only one instance of the view.
+  isSameTab: function(viewId, params){
+    return viewId === 'OBUIAPP_AlertManagement';
+  },
+  
+  sectionStack: null,
+  grids: {},
+  sections: {},
+  alertRules: null,
+  //Section header controls:
+  NewAcknowledged: null,
+  NewSuppressed: null,
+  AcknowledgedNew: null,
+  AcknowledgedSuppressed: null,
+  SuppressedNew: null,
+  SuppressedAcknowledged: null,
+  
+  initWidget: function(){
+    OB.AlertManagement = this;
+    
+    this.addMember(isc.OBToolbar.create({
+        view: this,
+        leftMembers: [isc.OBToolbarIconButton.create(isc.OBToolbar.REFRESH_BUTTON_PROPERTIES)],
+        rightMembers: []
+      }));
+    
+    this.sectionStack = isc.OBSectionStack.create();
+    this.addMember(this.sectionStack);
+
+    this.Super('initWidget', arguments);
+    this.getAlertRules();
+  },
+  
+  getAlertRules: function() {
+    post = {'eventType': 'getAlertRules' };
+
+    OB.RemoteCallManager.call('org.openbravo.client.application.AlertManagementActionHandler',
+        post, {}, function(rpcResponse, data, rpcRequest){
+      OB.AlertManagement.alertRules = data.alertRules;
+      // Sections are created after alertRules are created. This is needed to be able to filter
+      // properly the grids of the sections.
+      OB.AlertManagement.createSections();
+    });
+
+  },
+  
+  createSections: function() {
+    this.grids.New = isc.OBAlertGrid.create({alertStatus: 'New'});
+    this.NewAcknowledged = isc.OBAlertSectionStackControl.create({currentStatus: 'New', newStatus: 'Acknowledged', ID:'NewAcknowledged'});
+    this.NewSuppressed = isc.OBAlertSectionStackControl.create({currentStatus: 'New', newStatus: 'Suppressed', ID:'NewSuppressed'});
+    this.sections.New = {
+        title: OB.I18N.getLabel('AlertStatus_New'),
+        alertStatus: 'New',
+        expanded: true,
+        items: [this.grids.New],
+        controls: [this.NewAcknowledged, this.NewSuppressed]};
+    this.sectionStack.addSection(this.sections.New);
+
+    this.grids.Acknowledged = isc.OBAlertGrid.create({alertStatus: 'Acknowledged'});
+    this.AcknowledgedNew = isc.OBAlertSectionStackControl.create({currentStatus: 'Acknowledged', newStatus: 'New', ID:'AcknowledgedNew'});
+    this.AcknowledgedSuppressed = isc.OBAlertSectionStackControl.create({currentStatus: 'Acknowledged', newStatus: 'Suppressed', ID:'AcknowledgedSuppressed'});
+    this.sections.Acknowledged = {
+        title: OB.I18N.getLabel('AlertStatus_Acknowledged'),
+        alertStatus: 'Acknowledged',
+        expanded: false,
+        items: [this.grids.Acknowledged],
+        controls: [this.AcknowledgedNew, this.AcknowledgedSuppressed]};
+    this.sectionStack.addSection(this.sections.Acknowledged);
+
+    this.grids.Suppressed = isc.OBAlertGrid.create({alertStatus: 'Suppressed'});
+    this.SuppressedNew = isc.OBAlertSectionStackControl.create({currentStatus: 'Suppressed', newStatus: 'New', ID:'SuppressedNew'});
+    this.SuppressedAcknowledged = isc.OBAlertSectionStackControl.create({currentStatus: 'Suppressed', newStatus: 'Acknowledged', ID:'SuppressedAcknowledged'});
+    this.sections.Suppressed = {
+        title: OB.I18N.getLabel('AlertStatus_Suppressed'),
+        alertStatus: 'Suppressed',
+        expanded: false,
+        items: [this.grids.Suppressed],
+        controls: [this.SuppressedNew, this.SuppressedAcknowledged]};
+    this.sectionStack.addSection(this.sections.Suppressed);
+
+    this.grids.Solved = isc.OBAlertGrid.create({alertStatus: 'Solved'});
+    this.sections.Solved = {
+        title: OB.I18N.getLabel('AlertStatus_Solved'), alertStatus: 'Solved', expanded: false, items: [this.grids.Solved] };
+    this.sectionStack.addSection(this.sections.Solved);
+  },
+  
+  moveToStatus: function(alertIDs, oldStatus, newStatus) {
+    post = {'eventType': 'moveToStatus',
+            'oldStatus': oldStatus,
+            'newStatus': newStatus,
+            'alertIDs': alertIDs};
+
+    OB.RemoteCallManager.call('org.openbravo.client.application.AlertManagementActionHandler',
+        post, {}, function(rpcResponse, data, rpcRequest){
+          OB.AlertManagement.grids[data.newStatus].invalidateCache();
+          // If section has not been expanded the grid is not reloaded so the total rows is not updated.
+          if (!OB.AlertManagement.sections[data.newStatus].expanded) {
+            OB.AlertManagement.grids[data.newStatus].getGridTotalRows();
+          }
+          // Old status is always expanded to be able to select the rows
+          OB.AlertManagement.grids[data.oldStatus].invalidateCache();
+    });
+  },
+  
+  setTotalRows: function(totalRows, status) {
+    if (OB.AlertManagement.sections[status]) {
+      OB.AlertManagement.sections[status].getSectionHeader()
+          .setTitle(OB.I18N.getLabel('OBUIAPP_AlertSectionHeader', [status, totalRows]));
+    }
+  },
+  
+  refresh: function() {
+    var i, alertStatus = ['New', 'Acknowledged', 'Suppressed', 'Solved'];
+    for (i = 0; i < 4; i++) {
+      OB.AlertManagement.grids.alertStatus[i].invalidateCache();
+      if (!OB.AlertManagement.sections.alertStatus[i].expanded) {
+        OB.AlertManagement.grids.alertStatus[i].getGridTotalRows();
+      }
+    }
+  }
+});
+
+isc.ClassFactory.defineClass('OBAlertSectionStackControl', isc.OBSectionItemControlLink);
+isc.OBAlertSectionStackControl.addProperties({
+  newStatus: null,
+  currentStatus: null,
+  
+  initWidget: function () {
+    this.setContents(OB.I18N.getLabel('OBUIAPP_MoveSelectedToStatus', [this.newStatus]));
+    this.Super('initWidget', arguments);
+  },
+  
+  action: function() {
+    var i,
+        alerts = '',
+        selectedAlerts = OB.AlertManagement.grids[this.currentStatus].getSelection(),
+        selAlertsLength = selectedAlerts.length;
+    if (selAlertsLength === 0) {
+      return;
+    }
+    for (i = 0; i < selAlertsLength; i++) {
+      if (alerts !== '') {
+        alerts += ',';
+      }
+      alerts += selectedAlerts[i].id;
+    }
+    OB.AlertManagement.moveToStatus(alerts, this.currentStatus, this.newStatus);
+  }
+});
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-alert-manager.js	Fri Mar 25 10:34:18 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-alert-manager.js	Fri Mar 25 10:47:27 2011 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -144,12 +144,12 @@
       overflow : 'visible',
       click : function() {
         var viewDefinition = {
-          obManualURL : '/ad_forms/AlertManagement.html',
-          command : 'DEFAULT',
-          formId : '800016',
+          //obManualURL : '/ad_forms/AlertManagement.html',
+          //command : 'DEFAULT',
+          //formId : '800016',
           i18nTabTitle : 'UINAVBA_AlertManagement'
         };
-        OB.Layout.ViewManager.openView('OBClassicWindow', viewDefinition);
+        OB.Layout.ViewManager.openView('OBUIAPP_AlertManagement', viewDefinition);
       }
 
     });