0

zk5.0.2中zul.sel.ItemWidget类中,未声明_selected属性,调用isSelected()函数时报undefined错误

asked 2010-06-11 20:16:43 +0800

SummerGreen2008 gravatar image SummerGreen2008
30

如题:zk5.0.2中zul.sel.ItemWidget类中,未声明_selected属性,调用isSelected()函数时报undefined错误

delete flag offensive retag edit

1 Reply

Sort by » oldest newest

answered 2010-06-11 20:31:10 +0800

SummerGreen2008 gravatar image SummerGreen2008
30

已解决:

错误因为直接弹出alert(listitem.isSelected());未被选中的当前listitem的_selected属性不存在的
var itemInter =this.faxList().itemIterator() ;
while(itemInter.hasNext()){
var listitem = itemInter.next();
alert(listitem.isSelected());
break;
}
直接if判断
var itemInter =this.faxList().itemIterator() ;
while(itemInter.hasNext()){
var listitem = itemInter.next();
if(listitem.isSelected()){
listitem.setSelected(false);
}else{
listitem.setSelected(true);
}
}

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-06-11 20:16:43 +0800

Seen: 718 times

Last updated: Jun 11 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More