01: package org.osbl.riskmanagement.gui;
02:
03: import org.osbl.client.wings.concern.ObjectFormViewModes;
04: import org.conform.modifier.InlineModifier;
05: import org.conform.DefaultBeanData;
06: import org.conform.wings.editor.BooleanEditor;
07:
08: public class DiscardRiskForm extends RiskForm {
09: public DiscardRiskForm() {
10: addViewModeVariation(ObjectFormViewModes.ACTIVITY_VIEW,
11: new InlineModifier() {
12: protected void configure() {
13: property("type").setWritable(false);
14: property("coverage").setWritable(false);
15: property("amount").setWritable(false);
16: property("probability").setWritable(false);
17: property("comment").setWritable(false);
18: property("assignee").setWritable(false);
19: property("criticality").setWritable(false);
20: property("progression").setWritable(false);
21: property("obsolete").setWritable(false);
22:
23: property("obsolete").setWritable(true);
24: property("obsolete").setAttribute(
25: DefaultBeanData.PROPERTY_DATA_CLASS,
26: NowOrNeverPropertyData.class.getName());
27: property("obsolete").setAttribute(
28: org.conform.wings.Editor.CUSTOM_EDITOR,
29: new BooleanEditor());
30: }
31: });
32: setViewMode(ObjectFormViewModes.ACTIVITY_VIEW);
33: }
34: }
|