Added null check and fixed scroll to row for zk6

This commit is contained in:
Heng Sin Low 2012-03-05 12:52:25 +08:00
parent c82793df29
commit 33fd4e4ae3
1 changed files with 10 additions and 6 deletions

View File

@ -6,20 +6,24 @@ function ad_deferRenderBorderLayout(uuid, timeout) {
}
function _ad_deferBDL(uuid) {
zk.Widget.$(uuid).resize();
var cmp = zk.Widget.$(uuid);
if (cmp) { cmp.resize(); }
}
function ad_closeBuble(uuid) {
var cmp = zk.Widget.$(uuid);
for(var i=0;i<cmp.bandInfos.length;i++){
cmp.instance.getBand(i).closeBubble();
if (cmp) {
for(var i=0;i<cmp.bandInfos.length;i++){
cmp.instance.getBand(i).closeBubble();
}
}
}
function scrollToRow(uuid){
var cmp = zk.Widget.$(uuid);
cmp.$n().style.display='inline';
cmp.focus();
cmp.$n().style.display='none';
if (cmp) {
cmp.scrollIntoView();
cmp.focus();
}
}