Problem onclick event with button

asked 2017-09-07 14:24:07 +0800

wigberto gravatar image wigberto
52 4

updated 2017-09-08 02:00:03 +0800

cor3000 gravatar image cor3000
4912 2 7
ZK Team

I have the following problem. In a .zul file I have a button with the following code:

<button label="${labels.labels.accept}" id="selectFilterButton" 
    onClick="@command('cmdSelectFilter', tabbox = tabbox, chartPie = chartPie, chartBar = chartBar, chartBubble = chartBubble)"
    style="width: 100px; height: 30px" sclass="btn-success"/>

And I have a java class that retrieves a series of parameters from a .zul page to return to the page where I have the button I mentioned, so that with the parameters that I retrieve the button can be executed through the onClick event. The code I'm trying to run is as follows, but I do not know how to tell the button's id to "Events.sendEvent".

if (Executions.getCurrent().getParameter("selectDateDeliveryNotesPerDate") != null) {
            String client = Executions.getCurrent().getParameter("selectClient");
            String dateDeliveryNotesPerDate = 
            selectedDate = dateFormat.parse(dateDeliveryNotesPerDate);
            Events.sendEvent(Events.ON_CLICK, id_button, null);

Forgive me for my English, I hope I have explained well.
Thank you.

delete flag offensive retag edit


is the java code in a viewmodel's command? if yes => use @selectorparam to retrieve the button

chillworld ( 2017-09-07 18:19:15 +0800 )edit

Thank you chillworld. I have already solved it, I used the option 'Wire components' and it worked correctly.

wigberto ( 2017-09-14 19:14:33 +0800 )edit
Be the first one to answer this question!
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

1 follower



Asked: 2017-09-07 14:24:07 +0800

Seen: 23 times

Last updated: Sep 08 '17

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