0

What is the ZK8 equivalent specification for SimpleForm?

asked 2019-01-03 13:58:01 +0800

abhi2008 gravatar image abhi2008
61 1 1 4

updated 2019-01-31 09:27:29 +0800

cor3000 gravatar image cor3000
4466 2 7
ZK Team

Hi All,

What is the ZK8 equivalent specification for SimpleForm class? I have custom class which extends FormImpl.

How to migrate the below class in ZK8?

public class NotifiableSimpleForm extends FormImpl { 

    private initCount = 0;

    public OXNotifiableSimpleForm() {
        super();
    }

    @Override
    public void addSaveFieldName(String fieldName) {
        super(fieldName);
        initCount++;
    }

    @Override
    public void setField(String field, Object value) {
        super.setField(field, value);

    if (initCount > 0) {
        if (isDirty()) {
            // Do what you have to do

            System.out.println("isDirty");
         } else {
             // The other case
             System.out.println("is not Dirty");
         }
    } else {
        initCount--;
    }
}

Thanks

Abhi2008

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-01-31 12:45:40 +0800

cor3000 gravatar image cor3000
4466 2 7
ZK Team

updated 2019-02-11 14:25:12 +0800

ZK 8 uses proxy objects for forms, there's no direct replacement for this code.

What do you intend to do?

In order to create a Form Proxy object you can use the ProxyHelper class.

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: 2019-01-03 13:58:01 +0800

Seen: 14 times

Last updated: Feb 11

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