details: /erp/stable/2.50/rev/d2395c19ca01
changeset: 9194:d2395c19ca01
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Feb 10 09:29:24 2011 +0100
summary: related to issue 15907: Reseting to tabId, not window Id
details: /erp/stable/2.50/rev/e3f618272cb9
changeset: 9195:e3f618272cb9
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Thu Feb 10 09:32:04 2011 +0100
summary: related to issue 15907: get preferences from string params
diffstat:
src-wad/src/org/openbravo/wad/javasource.javaxml | 3 +-
src/org/openbravo/erpCommon/businessUtility/Preferences.java | 19 ++++++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r b2219dd654ed -r e3f618272cb9
src-wad/src/org/openbravo/wad/javasource.javaxml
--- a/src-wad/src/org/openbravo/wad/javasource.javaxml Wed Feb 09 18:05:26
2011 +0100
+++ b/src-wad/src/org/openbravo/wad/javasource.javaxml Thu Feb 10 09:32:04
2011 +0100
@@ -101,8 +101,7 @@
</FIELDS_TMP>
}
if (!securedProcess) {
- classInfo.type = "W";
- classInfo.id = windowId;
+ setClassInfo("W", tabId, moduleId);
}
super.service(request, response);
}
diff -r b2219dd654ed -r e3f618272cb9
src/org/openbravo/erpCommon/businessUtility/Preferences.java
--- a/src/org/openbravo/erpCommon/businessUtility/Preferences.java Wed Feb
09 18:05:26 2011 +0100
+++ b/src/org/openbravo/erpCommon/businessUtility/Preferences.java Thu Feb
10 09:32:04 2011 +0100
@@ -158,6 +158,25 @@
}
/**
+ * @see Preferences#getPreferenceValue(String, boolean, Client,
Organization, User, Role, Window)
+ */
+ public static String getPreferenceValue(String property, boolean
isListProperty,
+ String strClient, String strOrg, String strUser, String strRole, String
strWindow)
+ throws PropertyException {
+ 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();
+ }
+ }
+
+ /**
* Obtains the value for a given property with the visibility defined by the
parameters. In case
* of conflict or the property is not defined an exception is thrown.
* <p>
------------------------------------------------------------------------------
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