Revision history [back]

click to hide/show revision 1
initial version

answered 2018-01-10 15:02:18 +0800

hawk gravatar image hawk

http://hawkphoenix.blogsp... ZK Team

I found if you wire an event listener in a HtmlMacroComponent for a listitem like the code below, it doesn't wire as expected.

public class MyListbox extends HtmlMacroComponent {

    @Listen("onClick = listitem")
    public void click(){
        Clients.showNotification("click a macro");
    }
}

It looks a like a bug, I have posted it.

If you use ZK 8, you can replace with the macro with <apply> and a composer.

I found if you wire an event listener in a HtmlMacroComponent for a listitem like the code below, it doesn't wire as expected.

public class MyListbox extends HtmlMacroComponent {

    @Listen("onClick = listitem")
    public void click(){
        Clients.showNotification("click a macro");
    }
}

It looks a like a bug, I have posted it.

But usually we don't listen onClick for a listitem, you can listen onSelect on a Listbox.

If you use ZK 8, you can replace with the macro with <apply> and a composer.

Hope those workarounds above work for you.

I found if you wire an event listener in a HtmlMacroComponent for a listitem like the code below, it doesn't wire as expected.

public class MyListbox extends HtmlMacroComponent {

    @Listen("onClick = listitem")
    public void click(){
        Clients.showNotification("click a macro");
    }
}

It looks a like a bug, I have posted it.

But usually we don't listen onClick for a listitem, you can listen onSelect on a Listbox.Listbox. Or just listen to onClick event in its parent composer.

If you use ZK 8, you can replace with the macro with <apply> and a composer.

Hope those workarounds above work for you.

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