0

Problem with @command: I can't firing event [closed]

asked 2013-01-30 09:19:34 +0800

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated 2013-01-30 09:19:34 +0800

lramellavotta gravatar image lramellavotta flag of Italy
200 1 8

Hello all, I'm trying last zk version to verify some features. My form is very simple with a listbox and button to delete row. When I click on button I can't firing event. I read examples and the book "ZK 6.5 Essentials" obviously I do not have understood something. Can someone explain where am I wrong? Thanks Luca

<window title="Gestione Utenti" border="normal" >
<caption>
    <button label="Aggiungi" onClick="@command('addUtente')" disabled="@load(not empty vm.selected)"/>
</caption>
<div apply="org.zkoss.bind.BindComposer" viewModel="@id('vm')
    @init('rvl.stcc.ui.aaa')">
    <listbox id="lbxUtenti" model="@load(vm.utenti)" selectedItem="@bind(vm.selected)">

... JAVA Class

@Command()
public void addUtente() throws Exception
{
    System.out.println("Sono in addUtente");
}
delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by sjoshi
close date 2013-02-08 06:37:54

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-30 09:55:28 +0800

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated 2013-01-30 09:55:28 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

the @command is outside a BindComposer, you should move the BindComposer outside to include the @command, or move the button inside div

link publish delete flag offensive edit

Comments

thanks danny

lramellavotta ( 2013-01-30 10:22:57 +0800 )edit

Question tools

Follow
2 followers

RSS

Stats

Asked: 2013-01-30 09:19:34 +0800

Seen: 21 times

Last updated: Jan 30 '13

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