1
2
3
4
5
6
7 package org.weda.page;
8
9 import org.apache.tapestry.annotations.InjectObject;
10 import org.apache.tapestry.html.BasePage;
11 import org.weda.store.ObjectSource;
12 import org.weda.store.ObjectSourceRegistry;
13
14 /**
15 *
16 * @author Mikhail Titov
17 */
18 public abstract class CompanyEdit extends BasePage {
19 @InjectObject("service:org.weda.store.ObjectSourceRegistry")
20 public abstract ObjectSourceRegistry getDataSourceRegistry();
21
22 public boolean canShowDetail() throws Exception {
23 ObjectSource ds = getDataSourceRegistry().getObjectSource("company2");
24 return ds.isDetailConstraintsActivated();
25 }
26 }