01: package org.osbl.identity.gui;
02:
03: import org.osbl.client.wings.form.*;
04: import org.osbl.client.wings.form.layouter.*;
05: import org.osbl.client.wings.shell.Client;
06: import org.osbl.identity.model.Identity;
07: import org.osbl.identity.model.Address;
08: import org.conform.BeanMeta;
09: import org.conform.VariationBeanMetaProvider;
10: import org.conform.modifier.InlineModifier;
11:
12: public class AddressForm extends GenericObjectForm {
13: public AddressForm() {
14: }
15:
16: protected Instruction createLayoutInstruction() {
17: return new PageSet(new Page(Identity.class.getName(),
18: new Division(new Column(new Title(Address.class
19: .getName()), new LabelAndEditor(
20: ComponentProvider.ROOT, "street"),
21: new LabelAndEditor(ComponentProvider.ROOT,
22: "postcode"), new LabelAndEditor(
23: ComponentProvider.ROOT, "city")),
24: new Column())));
25: }
26:
27: protected Object getObject(String path) {
28: return object;
29: }
30:
31: protected void setObject(String path, Object object) {
32: this .object = object;
33: }
34:
35: protected BeanMeta createBeanMeta(String path) {
36: VariationBeanMetaProvider provider = new VariationBeanMetaProvider(
37: Client.getInstance().getBeanMetaProvider());
38: provider.addModifier(new InlineModifier() {
39: protected void configure() {
40: }
41: });
42: return provider.getBeanMeta(Address.class);
43: }
44: }
|