protected AddItemToCollectionTask(final Context context, final NakedObject target, final OneToManyAssociation fld) { super(context, "Add to collection", "", target, 1); names[0] = fld.getName(); descriptions[0] = fld.getDescription(); fieldSpecifications[0] = fld.getSpecification(); initialState[0] = null; optional[0] = true; // TODO add defaults and options this.field = fld; }
public AddItemToCollectionTask(final Context context, final NakedObject target, final OneToManyAssociation fld) { super(context, "Add to collection", "", target, 1); names[0] = fld.getName(); descriptions[0] = fld.getDescription(); fieldSpecifications[0] = fld.getSpecification(); initialState[0] = null; optional[0] = true; // TODO add defaults and options this.field = fld; }
public String getDescription() { return field.getName() + ": " + getOneToManyAssociation().getDescription(); }
@Override public String getDescription() { final String name = getFieldName(); String type = getField().getSpecification().getSingularName(); type = name.indexOf(type) == -1 ? " (" + type + ")" : ""; final String description = getOneToManyAssociation().getDescription(); return name + type + " " + description; }