0

ZK8 - how is FormDirty determined

asked 2017-08-09 08:44:11 +0800

JustinFrost gravatar image JustinFrost
139 1 6

We have just upgraded to ZK8.

We have a lot of forms as follows:

<fromcomponent form="@id('formData') @load(vm.dataModel) @save(vm.dataModel, before='doSaveDataModel')"  formDataModified="@load(formDataStatus.dirty)">

    ........

The formComponent setFormDataModified method makes the submit button visible if dirty is true.

In ZK8 I notice if I change a text field on the form then the formDataStatus.dirty returns true and the submit button is displayed. However if I change the text field value back to the previous value then the formDataStatus.dirty still returns true.

This behaviour wis different to ZK7 where the formDataStatus.dirty would return false if the text field value was changed back to the original.

Is there anything else I need to implement to make it work the way it used to in ZK7 ?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-10 03:12:28 +0800

cor3000 gravatar image cor3000
4366 2 7
ZK Team

updated 2017-08-10 03:13:55 +0800

No this functionality has been removed in ZK8. Since the new Form binding is based on real objects and proxies around them a proxy once updated is considered "dirty" until it is submitted or reset.

link publish delete flag offensive edit

Comments

Ok thanks cor3000.

JustinFrost ( 2017-08-10 03:48:03 +0800 )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
2 followers

RSS

Stats

Asked: 2017-08-09 08:44:11 +0800

Seen: 13 times

Last updated: Aug 10 '17

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