Esempio n. 1
0
 public EntityModel toEditMode() {
   setMode(Mode.EDIT);
   for (final ScalarModel scalarModel : propertyScalarModels.values()) {
     scalarModel.toEditMode();
   }
   return this;
 }
Esempio n. 2
0
 /** Lazily populates with the current value of each property. */
 public ScalarModel getPropertyModel(final PropertyMemento pm) {
   ScalarModel scalarModel = propertyScalarModels.get(pm);
   if (scalarModel == null) {
     scalarModel = new ScalarModel(getObjectAdapterMemento(), pm);
     if (isViewMode()) {
       scalarModel.toViewMode();
     } else {
       scalarModel.toEditMode();
     }
     propertyScalarModels.put(pm, scalarModel);
   }
   return scalarModel;
 }