01: package org.osbl.identity.gui;
02:
03: import org.osbl.client.wings.form.*;
04: import org.osbl.client.wings.shell.Client;
05: import org.osbl.persistence.Persistence;
06: import org.osbl.identity.model.Address;
07: import org.conform.BeanMeta;
08: import org.conform.VariationBeanMetaProvider;
09: import org.conform.modifier.InlineModifier;
10:
11: public class AddressList extends GenericObjectList {
12: Persistence persistence;
13:
14: protected BeanMeta createBeanMeta() {
15: return new VariationBeanMetaProvider(Client.getInstance()
16: .getBeanMetaProvider()).addModifier(
17: new InlineModifier() {
18: protected void configure() {
19: property("street").setWritable(false);
20: property("postcode").setWritable(false);
21: property("city").setWritable(false);
22: }
23: }).getBeanMeta(Address.class);
24: }
25:
26: protected ObjectTableModel createModel(BeanMeta beanMeta) {
27: return new GenericObjectTableModel(beanMeta, "street",
28: "postcode", "city");
29: }
30:
31: public Object getRow(int index) { // was protected
32: return ((GenericObjectTableModel) getModel()).getRow(index);
33: }
34: }
|