0

Cannot read property 'checked' of undefined on CheckBox, MVVM and Bootstrap

asked 2016-01-15 10:15:26 +0800

afxgroup gravatar image afxgroup
126 1

updated 2016-01-15 10:55:26 +0800

Hi

I'm using ZK8 with MVVM as usual along Bootstrap and DataTables plugin. So i've created a Grid styled with DataTables and all is working correctly, but only if i have one page. Since i have a checkbox binded with "enabled" field of my object i get the error:

Cannot read property 'checked' of undefined

This happens when i have two pages and the communication between client and server doesn't work anymore. I suspect because the checkbox is not shown in the table.

EDIT: This happens here:

zul.wgt.Checkbox.zk.$extends.bind_ @zk.wpd:72

EDIT2: This happens here. "c" is undefined

if(c.checked!=c.defaultChecked){c.checked=c.defaultChecked}

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-01-17 13:18:34 +0800

Darksu gravatar image Darksu
1991 1 4

Hello afxgroup,

Your assumption is correct, thus you should re-think how you will set up your components or please post your code so we can check it out.

For more information please read the following:

http://books.zkoss.org/wiki/ZKDeveloper'sReference/UIComposing/IDSpace

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-01-19 18:25:41 +0800

afxgroup gravatar image afxgroup
126 1

Well. I've fixed all using zk.afterMount and zk.afterAuresponse functions. Now all is working correctly and i have the DataTable plugin working perfectly with MVVM

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2016-01-15 10:15:26 +0800

Seen: 23 times

Last updated: Jan 19 '16

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