First time here? Check out the FAQ!
Hi
I am using MVVM, i am creating the component from java file and now i want to call a method in the same java file for on click event as shown here
Button mybutton = new Button();
mybutton.setParent(parentdiv);
mybutton.Addevent("OnClicl","onClickMyButton");
@Command
public void onClickMyButton()
{
}
The above way is possible ?
Hello Senthilchettyin,
In the following link, there is a very good example on how to achieve your task:
http://forum.zkoss.org/question/19359/dynamically-create-componentsevent-handler/
You can also check the following link for adding event handlers to a dynamically created toolbar:
http://zkfiddle.org/sample/3al93nr/7-Add-Event-Handlers-to-Dynamically-Created-Toolbar#source-2
Best Regards,
Darksu
Asked: 2014-05-28 17:56:05 +0800
Seen: 76 times
Last updated: Aug 20 '14
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]