From 033d138181b0003f116ce518591f5ddeb4f9b3f2 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 28 Oct 2013 15:45:09 +0800 Subject: [PATCH] 1003395 User window error Failed to process script. Add try .. catch block. IDEMPIERE-1493 --- .../WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java index 1338b3a50e..160d8aad50 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java @@ -974,7 +974,7 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value public void onPageAttached(Page newpage, Page oldpage) { super.onPageAttached(newpage, oldpage); if (newpage != null) { - String w = "var btn=jq('#'+this.parent.uuid+' @button').zk.$();"; + String w = "try{var btn=jq('#'+this.parent.uuid+' @button').zk.$();}catch(err){}"; getTextbox().setWidgetListener("onChange", "try{"+w+"btn.setImage(\"" + Executions.getCurrent().encodeURL(IN_PROGRESS_IMAGE)+"\");" + "btn.setDisabled(true, {adbs: false, skip: false});}catch(err){}");