IDEMPIERE-624 Null.pointer.exception in zoom to column.

This commit is contained in:
Heng Sin Low 2013-02-18 14:33:38 +08:00
parent 6a8ded433e
commit eac774fb67
4 changed files with 37 additions and 21 deletions

View File

@ -481,6 +481,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
setActiveTab(gridWindow.getTabIndex(gTab), null);
gTab.navigate(i);
if (gc.isGridView())
gc.switchRowPresentation();
return true;
}
}

View File

@ -255,7 +255,7 @@ public class CompositeADTabbox extends AbstractADTabbox
return;
IADTabpanel tabPanel = (IADTabpanel) event.getTarget();
if (tabPanel != headerTab) {
if (tabPanel != headerTab && headerTab.getDetailPane() != null) {
if (b != null && b.booleanValue()) {
onActivateDetail(tabPanel);
}

View File

@ -46,6 +46,7 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Cell;
import org.zkoss.zul.Column;
import org.zkoss.zul.Div;
import org.zkoss.zul.Frozen;
@ -632,11 +633,8 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
Component c = (Component) o;
if (!c.isVisible())
continue;
c = c.getFirstChild();
if (c == null)
continue;
if (c.getNextSibling() != null) {
cmp = c.getNextSibling();
if (c instanceof Cell) {
cmp = c;
break;
}
}

View File

@ -1,25 +1,41 @@
function ad_deferRenderBorderLayout(uuid, timeout) {
var meta = zk.Widget.$(uuid);
if (meta) {
setTimeout("_ad_deferBDL('"+uuid+"')", timeout);
try {
var meta = zk.Widget.$(uuid);
if (meta) {
setTimeout("_ad_deferBDL('"+uuid+"')", timeout);
}
} catch (err) {
if (console) console.log(err);
}
}
function _ad_deferBDL(uuid) {
var cmp = zk.Widget.$(uuid);
if (cmp) { cmp.resize(); }
function _ad_deferBDL(uuid) {
try {
var cmp = zk.Widget.$(uuid);
if (cmp) { cmp.resize(); }
} catch (err) {
if (console) console.log(err);
}
}
function _ad_closeBuble(link) {
var parent = link.parentsUntil("simileAjax-bubble-contentContainer");
var btn = parent.next();
btn.click();
try {
var parent = link.parentsUntil("simileAjax-bubble-contentContainer");
var btn = parent.next();
btn.click();
} catch (err) {
if (console) console.log(err);
}
}
function scrollToRow(uuid){
var cmp = zk.Widget.$(uuid);
if (cmp) {
cmp.scrollIntoView();
cmp.focus();
}
function scrollToRow(uuid){
try {
var cmp = zk.Widget.$(uuid);
if (cmp) {
cmp.scrollIntoView();
cmp.focus();
}
} catch (err) {
if (console) console.log(err);
}
}