01: package org.osbl.client.wings.form;
02:
03: import org.osbl.client.wings.form.layouter.Instruction;
04: import org.osbl.client.wings.form.GenericObjectForm;
05: import org.osbl.client.wings.form.ObjectForm;
06: import org.conform.BeanMeta;
07: import org.wings.SComponent;
08:
09: public abstract class GenericObjectSubForm implements ObjectSubForm {
10: ObjectForm objectForm;
11: protected int viewMode = ObjectForm.EDIT;
12:
13: public void setObjectForm(ObjectForm objectForm) {
14: this .objectForm = objectForm;
15: }
16:
17: public void setViewMode(int viewMode) {
18: this .viewMode = viewMode;
19: }
20:
21: public void initializeSubForm() {
22: }
23:
24: public void setObject(Object object) {
25: }
26:
27: public abstract Object getObject(String path);
28:
29: public abstract void setObject(String path, Object object);
30:
31: public abstract BeanMeta createBeanMeta(String path);
32:
33: public SComponent createCustomComponent(String key) {
34: return null;
35: }
36:
37: /**
38: * It's the subForm's job to append its layout to the main layout.
39: * @param mainInstruction the extendable conform's layout instructions
40: */
41: public abstract void appendLayoutInstructions(
42: Instruction mainInstruction);
43:
44: protected GenericObjectForm getGenericObjectForm() {
45: return ((GenericObjectForm) objectForm);
46: }
47: }
|