1

How To Check Dirty Status in ZK8?

asked 2015-10-08 02:59:40 +0800

kleponboy gravatar image kleponboy flag of Indonesia
54 5
http://stupidprogrammers....

updated 2015-10-08 03:02:19 +0800

I just upgraded myProject to ZK8 , then I get an error message saying "SimpleForm Class Cannot be resolved to a type". I go to ZK8 Javadoc to check whether the SimpleForm class included in ZK8 and didn't find any.

in ZK7 I used isDirty() method in SimpleForm class to check whether the form has been modified. so how do I do to check the dirty state in ZK8? is there any workaround for it?

Regards,

Klepon

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2015-10-08 06:02:38 +0800

Darksu gravatar image Darksu
1991 1 4

Hello kleponboy,

At the following url i found some interesting info regarding dirty status (Form Status Variable), hope it helps:

http://books.zkoss.org/zk-mvvm-book/8.0/databinding/formbinding.html

Best Regards,

Darksu

link publish delete flag offensive edit

Comments

thanks for the reply darksu. yours and chillworld answers provide me with good reference, wish I could accept more than one answer

kleponboy ( 2015-10-08 06:53:08 +0800 )edit
1

answered 2015-10-08 06:02:44 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

In know the implementation has changed a lot because you now the collections are also cached.

Looks like it's now with proxy.
This interface is what you need, and you can see what the subclasses are.

Chill.

link publish delete flag offensive edit

Comments

thanks for the reply chillworld, It's totally different approach in ZK8, I think I have to rewrite my code or stick with zk7 :(

kleponboy ( 2015-10-08 06:47:03 +0800 )edit

I think if you the form in zul with form=, it's stays the same.

chillworld ( 2015-10-08 07:00:08 +0800 )edit

Chillworld. Is there example available how to remove simplform used in ZK 7 and replace with new ZK 8 approach ?

Senthilchettyin ( 2016-01-04 06:53:18 +0800 )edit
1

answered 2016-01-04 09:05:05 +0800

cor3000 gravatar image cor3000
4332 1 7
ZK Team

instead of using SimpleForm you can now create the form proxy using: ProxyHelper.createProxyIfAny

As Chill already stated: To check the dirty status, the returned form proxy object can be cast into org.zkoss.bind.proxy.FormProxyObject

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
2 followers

RSS

Stats

Asked: 2015-10-08 02:59:40 +0800

Seen: 60 times

Last updated: Jan 04 '16

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