details: /erp/devel/pi/rev/06cb91c9976d
changeset: 10511:06cb91c9976d
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Feb 10 09:25:06 2011 +0100
summary: related to issue 15874: Reseting to tabId, not window Id
details: /erp/devel/pi/rev/34c584c37edc
changeset: 10512:34c584c37edc
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Feb 10 09:26:14 2011 +0100
summary: related to issue 15874: Set admin mode when reading preferences
diffstat:
src-wad/src/org/openbravo/wad/javasource.javaxml | 3 +-
src/org/openbravo/erpCommon/businessUtility/Preferences.java | 17 +++++++----
2 files changed, 12 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r ae63b8518ed6 -r 34c584c37edc
src-wad/src/org/openbravo/wad/javasource.javaxml
--- a/src-wad/src/org/openbravo/wad/javasource.javaxml Thu Feb 10 08:18:22
2011 +0100
+++ b/src-wad/src/org/openbravo/wad/javasource.javaxml Thu Feb 10 09:26:14
2011 +0100
@@ -108,8 +108,7 @@
</FIELDS_TMP>
}
if (!securedProcess) {
- classInfo.type = "W";
- classInfo.id = windowId;
+ setClassInfo("W", tabId, moduleId);
}
super.service(request, response);
}
diff -r ae63b8518ed6 -r 34c584c37edc
src/org/openbravo/erpCommon/businessUtility/Preferences.java
--- a/src/org/openbravo/erpCommon/businessUtility/Preferences.java Thu Feb
10 08:18:22 2011 +0100
+++ b/src/org/openbravo/erpCommon/businessUtility/Preferences.java Thu Feb
10 09:26:14 2011 +0100
@@ -228,12 +228,17 @@
public static String getPreferenceValue(String property, boolean
isListProperty,
String strClient, String strOrg, String strUser, String strRole, String
strWindow)
throws PropertyException {
- Client client = OBDal.getInstance().get(Client.class, strClient == null ?
"" : strClient);
- Organization org = OBDal.getInstance().get(Organization.class, strOrg ==
null ? "" : strOrg);
- User user = OBDal.getInstance().get(User.class, strUser == null ? "" :
strUser);
- Role role = OBDal.getInstance().get(Role.class, strRole == null ? "" :
strRole);
- Window window = OBDal.getInstance().get(Window.class, strWindow == null ?
"" : strWindow);
- return getPreferenceValue(property, isListProperty, client, org, user,
role, window);
+ try {
+ OBContext.setAdminMode();
+ Client client = OBDal.getInstance().get(Client.class, strClient == null
? "" : strClient);
+ Organization org = OBDal.getInstance().get(Organization.class, strOrg ==
null ? "" : strOrg);
+ User user = OBDal.getInstance().get(User.class, strUser == null ? "" :
strUser);
+ Role role = OBDal.getInstance().get(Role.class, strRole == null ? "" :
strRole);
+ Window window = OBDal.getInstance().get(Window.class, strWindow == null
? "" : strWindow);
+ return getPreferenceValue(property, isListProperty, client, org, user,
role, window);
+ } finally {
+ OBContext.restorePreviousMode();
+ }
}
/**
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits