# Revision history [back]

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(){
}
}


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(){
}
}


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(){
}
}


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