1

I have a form built with zk. In this part :

<template name="model:group">            
            <group label="@load(each)" value="@load(each)" onClick="@command('viewGraph')"/>      
        </template>

I call method viewGraph() and i want that this value is sent to this method.
In JavaScript i should have made this:

onClick="function(parameter);"

In this case I don't know how to do.

Also, if i can't set an id on label because label is in a cycle so, it must have 1 different id.

What's the solution?

Halayem Anis
  • 7,654
  • 2
  • 25
  • 45
pippo15
  • 113
  • 1
  • 4
  • 17

1 Answers1

0

To access the group inside of viewGraph, write

 <group label="@load(each)" value="@load(each)" onClick="@command('viewGraph', self=self)"/>

public void viewGraph(@BindingParam("self") Integer self){
//your code here
}

See this for more info.

Nabil A.
  • 3,270
  • 17
  • 29