details:   /erp/devel/pi/rev/432f4c39e18f
changeset: 10323:432f4c39e18f
user:      Martin Taal <martin.taal <at> openbravo.com>
date:      Wed Feb 02 14:20:17 2011 +0100
summary:   Solve wrong computation of parent window

diffstat:

 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ComputeSelectedRecordActionHandler.java
 |  12 ++++-----
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (29 lines):

diff -r 3eee3bd161cf -r 432f4c39e18f 
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ComputeSelectedRecordActionHandler.java
--- 
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ComputeSelectedRecordActionHandler.java
      Wed Feb 02 14:17:42 2011 +0100
+++ 
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ComputeSelectedRecordActionHandler.java
      Wed Feb 02 14:20:17 2011 +0100
@@ -139,7 +139,8 @@
     // skip the first node
     tabTreeNode = tabTreeNode.getParentTabTreeNode();
     while (tabTreeNode != null) {
-      currentTabInfo = createTabInfo(currentTabInfo.getRecord(), tabTreeNode);
+      currentTabInfo = createTabInfo(currentTabInfo.getRecord(), 
currentTabInfo.getTab(),
+          tabTreeNode);
       if (currentTabInfo != null) {
         resultList.add(0, currentTabInfo.getJSONObject());
       }
@@ -150,12 +151,9 @@
     return result;
   }
 
-  private TabInfo createTabInfo(BaseOBObject childObject, TabTreeNode 
tabTreeNode) {
-    if (tabTreeNode.getParentTabTreeNode() == null) {
-      return null;
-    }
-    final String parentProperty = 
ApplicationUtils.getParentProperty(tabTreeNode.getTab(),
-        tabTreeNode.getParentTabTreeNode().getTab());
+  private TabInfo createTabInfo(BaseOBObject childObject, Tab childTab, 
TabTreeNode tabTreeNode) {
+    final String parentProperty = ApplicationUtils
+        .getParentProperty(childTab, tabTreeNode.getTab());
     final BaseOBObject parent = (BaseOBObject) childObject.get(parentProperty);
     final TabInfo tabInfo = new TabInfo();
     tabInfo.setRecord(parent);

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to