zkzk-grid

Get value from form of ZK


I have a problem with ZK!

This is my part of code:

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

        <!-- template for each element in model -->

        <template name="model" >                      
            <row >                          
                <label value="@load(each.hour)" />
                <label value="@load(each.value)" />                                         
            </row>                        
        </template>

When I click on group label I will create a graph with each.hour and each.value.

The problem is that these value is for all the table. I want that the graph get value only from clicked item. Is it possible?


Solution

  • The code is too vague, but I can suggest to try passing it through a BindingParam:

    onClick="@command('viewGraph', item=each)"/>
    

    but I'm not sure how you fill the underlying GroupsModel