From a08f30412abe0bcbc7759a1991d7fe5d2a503795 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 12 Sep 2013 10:49:17 +0800 Subject: [PATCH] IDEMPIERE-1357 Tree panel not is updated with result of "Find" window. --- .../i1.0c-release/oracle/201309111130_IDEMPIERE-1357.sql | 8 ++++++++ .../postgresql/201309111130_IDEMPIERE-1357.sql | 8 ++++++++ .../src/org/adempiere/webui/adwindow/ADTabpanel.java | 7 ++++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 migration/i1.0c-release/oracle/201309111130_IDEMPIERE-1357.sql create mode 100644 migration/i1.0c-release/postgresql/201309111130_IDEMPIERE-1357.sql diff --git a/migration/i1.0c-release/oracle/201309111130_IDEMPIERE-1357.sql b/migration/i1.0c-release/oracle/201309111130_IDEMPIERE-1357.sql new file mode 100644 index 0000000000..c412ebb319 --- /dev/null +++ b/migration/i1.0c-release/oracle/201309111130_IDEMPIERE-1357.sql @@ -0,0 +1,8 @@ +-- Sep 11, 2013 11:30:06 AM COT +-- IDEMPIERE-1357 Tree panel not is updated with result of "Find" window +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Record is not in current search',200231,'D','6380f694-62e5-4368-96a2-418b006e240a','RecordIsNotInCurrentSearch','Y',TO_DATE('2013-09-11 11:30:05','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-09-11 11:30:05','YYYY-MM-DD HH24:MI:SS'),0) +; + +SELECT register_migration_script('201309111130_IDEMPIERE-1357.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201309111130_IDEMPIERE-1357.sql b/migration/i1.0c-release/postgresql/201309111130_IDEMPIERE-1357.sql new file mode 100644 index 0000000000..e0832c7005 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201309111130_IDEMPIERE-1357.sql @@ -0,0 +1,8 @@ +-- Sep 11, 2013 11:30:06 AM COT +-- IDEMPIERE-1357 Tree panel not is updated with result of "Find" window +INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','Record is not in current search',200231,'D','6380f694-62e5-4368-96a2-418b006e240a','RecordIsNotInCurrentSearch','Y',TO_TIMESTAMP('2013-09-11 11:30:05','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-09-11 11:30:05','YYYY-MM-DD HH24:MI:SS'),0) +; + +SELECT register_migration_script('201309111130_IDEMPIERE-1357.sql') FROM dual +; + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index c154d827c6..702a9ea97c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -26,6 +26,7 @@ import java.util.Map.Entry; import java.util.logging.Level; import org.adempiere.base.Core; +import org.adempiere.exceptions.AdempiereException; import org.adempiere.webui.AdempiereIdGenerator; import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.LayoutUtils; @@ -1126,7 +1127,11 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer { if (nodeID > 0 && logger.isLoggable(Level.WARNING)) logger.log(Level.WARNING, "Tab does not have ID with Node_ID=" + nodeID); - return; + if (gridTab.getCurrentRow() >= 0) + { + gridTab.setCurrentRow(gridTab.getCurrentRow(), true); + } + throw new AdempiereException(Msg.getMsg(Env.getCtx(),"RecordIsNotInCurrentSearch")); } // Navigate to node row