Exemplo n.º 1
0
 /**
  * Creates a new reference editor.
  *
  * @param property the reference property
  * @param context the layout context
  * @return a new reference editor
  */
 protected IMObjectReferenceEditor<Entity> createReferenceEditor(
     Property property, LayoutContext context) {
   IMObjectReferenceEditor<Entity> editor =
       IMObjectReferenceEditorFactory.create(property, getObject(), context);
   editor.setAllowCreate(true);
   return editor;
 }
Exemplo n.º 2
0
 /**
  * Sets the target of the relationship.
  *
  * @param target the target. May be {@code null}
  */
 public void setTarget(Entity target) {
   if (targetEditor != null) {
     targetEditor.setObject(target);
   } else {
     getTarget().setValue(target != null ? target.getObjectReference() : null);
   }
 }
Exemplo n.º 3
0
 /**
  * Sets the source of the relationship.
  *
  * @param source the source. May be {@code null}
  */
 public void setSource(Entity source) {
   if (sourceEditor != null) {
     sourceEditor.setObject(source);
   } else {
     getSource().setValue(source != null ? source.getObjectReference() : null);
   }
 }