if (field == null) {
throw new NullPointerException();
}
final GlobalViewFactory factory = Toolkit.getViewFactory();
ViewSpecification cellSpec;
Content content;
if (field instanceof OneToManyAssociation) {
throw new UnexpectedCallException("no collections allowed");
} else if (field instanceof OneToOneAssociation) {
final ObjectSpecification fieldSpecification = field.getSpecification();
if (fieldSpecification.isParseable()) {
content = new TextParseableFieldImpl(object, value, (OneToOneAssociation) field);
// REVIEW how do we deal with IMAGES?
if (content.getAdapter() instanceof ImageValueFacet) {
return new BlankView(content);
}
if (!field.isVisible(IsisContext.getAuthenticationSession(), object, where).isAllowed()) {
return new BlankView(content);