0

is there any event trigger from zk component on binding ?

asked 2013-02-20 19:29:57 +0800

maradolla gravatar image maradolla
3

updated 2013-02-21 08:51:42 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

I need a event from zk component when the value of component is changed. i binded component value with a variable in ViewModel.

<z:textbox rows="10" id="z-RouteTextArea" class="z-RouteTextArea" width="100%"  value="@bind(fx.routeDefinition)" />

I am trying to listen change event on textbox, but it's not firing.

can any one please let me know which event will fire on binding.

delete flag offensive retag edit

Comments

what do you want to do when the value was changed?

dennis ( 2013-02-21 10:37:22 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-02-20 23:11:55 +0800

Matze2 gravatar image Matze2
773 7

First of all. Does

onChange="@command('myMethod')"

not work?

Other idea: I guess "fx" means that you use form binding. You can use a subclass of the ZK form class and listen to form changes like the following:

public class MyForm extends SimpleForm {
  ...
  @Override
  public void setField(String field, Object value) {
    super.setField(field, value);
    // your code to handle changes to form
  }
  ...
}
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: 2013-02-20 19:29:57 +0800

Seen: 32 times

Last updated: Feb 21 '13

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