-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a list<fund> and in fund object has a list<stock>. I would like to show in zul as follow . I don't know how to setting tempalte tag ,appreciate for your help.
fundname stockname stockprice
-------------------------------
A fund XXX 20
A fund YYY 30
C fund xxx 40
C fund yyy 50
thanks for the clarifications:
then the easiest will be to create a row object that contains a flattened view of the data. This will make the template trivial.
public class FundStockRow {
private Fund fund;
private Stock stock;
//constructor/getters
}
You then simply populate a flat ListModelList<FundStockRow>
:
grid.setModel(new ListModelList<FundStockRow>(buildFlatFundStockRows(funds)));
and the template can look like this:
<grid>
<template name="model">
<row>
<label value="${each.fund.name}"/>
<label value="${each.stock.name}"/>
<label value="${each.stock.price}"/>
</row>
</template>
</grid>
Asked: 2018-10-18 16:48:54 +0800
Seen: 12 times
Last updated: Oct 30 '18
ZK drang and drop and databinding [closed]
Editable interface to add users
Create Crud of a User that has a collection of books
Create a Zk session variable with a menu
Using databinding in menupopup
ZK Clustering, Session Replication Question [closed]
there are several ways to do so, some are using ZK EE features and some are version specific ... so which version and edition are you using? (just to provide useful help in then end)
cor3000 ( 2018-10-23 11:50:21 +0800 )editI'm using zk 8.0 . Thanks for your help.
n1046728 ( 2018-10-25 14:49:13 +0800 )editCE (community) or EE (enterprise)?
cor3000 ( 2018-10-25 18:46:17 +0800 )editCE(community)
n1046728 ( 2018-10-26 17:41:21 +0800 )edit