details:   /erp/devel/pi/rev/af155e868186
changeset: 9620:af155e868186
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Sat Jan 08 00:09:58 2011 +0100
summary:   Improved error handling

details:   /erp/devel/pi/rev/581ae92d6037
changeset: 9621:581ae92d6037
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Sat Jan 08 00:13:18 2011 +0100
summary:   Set field label colour to red for error cases

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
                                         |  8 ++++++++
 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
 |  2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r f356c5098a14 -r 581ae92d6037 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Sat Jan 08 00:08:30 2011 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
     Sat Jan 08 00:13:18 2011 +0100
@@ -62,6 +62,7 @@
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.service.db.DalConnectionProvider;
+import org.openbravo.service.json.JsonUtils;
 
 public class FormInitializationComponent extends BaseActionHandler {
   private static final Logger log = 
Logger.getLogger(FormInitializationComponent.class);
@@ -345,6 +346,13 @@
       }
 
       // }
+    } catch (Throwable t) {
+      final String jsonString = JsonUtils.convertExceptionToJson(t);
+      try {
+        return new JSONObject(jsonString);
+      } catch (JSONException e) {
+        log.error("Error while generating the error JSON object: " + 
jsonString, e);
+      }
     } finally {
       OBContext.restorePreviousMode();
     }
diff -r f356c5098a14 -r 581ae92d6037 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
     Sat Jan 08 00:08:30 2011 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/3.00/org.openbravo.client.application/ob-form-styles.css
     Sat Jan 08 00:13:18 2011 +0100
@@ -96,7 +96,7 @@
 .OBFormFieldInputError,
 .OBFormFieldSelectInputError,
 .OBFormFieldLabelError { 
-  color:#204268; 
+  color: red; //#204268; 
 }
 
 .OBFormFieldSelectPickerIcon,

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to