18 package org.turro.financials.portfolio;
20 import java.util.ArrayList;
21 import java.util.List;
22 import org.turro.elephant.db.WhereClause;
23 import org.turro.financials.model.contract.PortfolioStatus;
24 import org.turro.i18n.I_;
25 import org.turro.plugin.filter.IFilterValue;
26 import org.zkoss.zk.ui.event.Event;
27 import org.zkoss.zk.ui.event.EventListener;
28 import org.zkoss.zk.ui.event.Events;
29 import org.zkoss.zul.Detail;
40 this.portfolioStatus = portfolioStatus;
41 addEventListener(Events.ON_OPEN,
new EventListener() {
43 public void onEvent(Event event)
throws Exception {
49 private void fillDetail() {
50 if(getChildren().isEmpty()) {
54 wc.
addClause(
"and doc.contract = :contract");
58 public String getLabel() {
59 return I_.get(
"Contract");
62 public boolean hasValue() {
66 List<IFilterValue> l =
new ArrayList<IFilterValue>();
68 PortfolioGrid pg =
new PortfolioGrid();
69 pg.getFilter().load(RelationMode.RELATE_BOTH, l);
70 pg.setDefaultBehavior(
false);
74 PortfolioDisagreementsGrid pdg =
new PortfolioDisagreementsGrid(portfolioStatus.
getContract());
75 if(!pdg.getCollection().isEmpty()) {
76 pdg.setDefaultBehavior(
false);
void addClause(String clause)
void addNamedValue(String name, Object value)
PortfolioStatusDetailRow(PortfolioStatus portfolioStatus)