0

ZK Essentials Section 4.2 CRUD MVVM Checkbox Problem

asked 2020-04-17 23:44:57 +0800

MikeAllan04 gravatar image MikeAllan04
1

In Section 4.2 of the ZK Essentials documentation you construct a TodoList with a Listbox displaying the list of Todo items. Each Listitem displays a checkbox. When a Listitem is selected the selected Todo item is shown on the east (right side) margin that also shows a checkbox for the selected Todo item.

Using the project downloaded from Github there is a problem with the checkboxes.

Checking the checkbox in the list also updates the checkbox in the detail display.

Checking the checkbox on the detail display however does NOT update the checkmark on the Todo item in the list.

How do I make this work? The example you provide in Github for the zkessentials project doesn't work. I'm using the Community Edition of ZK 9.0.0.

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-04-20 18:36:52 +0800

MDuchemin gravatar image MDuchemin
1688 1 5
ZK Team

Hi there!

I can't seem to reproduce the issue locally on the current commit.

The right side panel is using a form binding to show the difference between form data and committed data. As long as the user doesn't click the "update" button on the bottom of that panel, the right-side form will not affect the main dataset. If you click the checkmark, then click the update button, the change will be applied, and should affect the rest of the data state. However, if you click "reload", local changes made to the entry (the status, title, description) will be discarded and reloaded from the model.

Do you see a different result, or an error in the console?

link publish delete flag offensive edit
0

answered 2020-04-21 22:32:35 +0800

MikeAllan04 gravatar image MikeAllan04
1

Hi MDuchemin!

Thanks for following up on this. I get it now, I misunderstood the behavior of the detail panel. The MVC example of the ToDo List works such that when you check the checkbox in the detail panel, the checkbox in the list also gets checked at the same time.

I wasn't taking into consideration that with the MVVM version of the ToDo List the change to the checkbox doesn't get registered until you click the Update button.

Thanks again for you help!

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: 2020-04-17 23:44:57 +0800

Seen: 11 times

Last updated: Apr 21

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