Skip to content

Commit

Permalink
Don't show zoom-to for non-zoom reference Lists
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed May 16, 2017
1 parent a1a6d63 commit c813dd8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/de/metas/ui/web/window/WindowConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public final class WindowConstants
public static final String FIELDNAME_DocumentSummary = "V$DocumentSummary";

public static final String CONTEXTVAR_NextLineNo = "CtxVar_NextLineNo";

public static final String TABLENAME_AD_Ref_List = "AD_Ref_List";

private WindowConstants()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import de.metas.logging.LogManager;
import de.metas.ui.web.quickinput.QuickInputDescriptorFactoryService;
import de.metas.ui.web.view.descriptor.ViewLayout;
import de.metas.ui.web.window.WindowConstants;
import de.metas.ui.web.window.datatypes.WindowId;
import de.metas.ui.web.window.descriptor.DocumentEntityDescriptor;
import de.metas.ui.web.window.descriptor.DocumentFieldDescriptor;
Expand Down Expand Up @@ -593,11 +594,18 @@ private final DocumentLayoutElementFieldDescriptor.Builder layoutElementField(fi
{
field.addCharacteristic(Characteristic.PublicField);
}

boolean supportZoomInfo = field.getWidgetType().isSupportZoomInto();
final String lookupTableName = field.getLookupTableName().orElse(null);
if(WindowConstants.TABLENAME_AD_Ref_List.equals(lookupTableName))
{
supportZoomInfo = false;
}

final DocumentLayoutElementFieldDescriptor.Builder layoutElementFieldBuilder = DocumentLayoutElementFieldDescriptor.builder(fieldName)
.setLookupSource(field.getLookupSourceType())
.setPublicField(field.hasCharacteristic(Characteristic.PublicField))
.setSupportZoomInto(field.getWidgetType().isSupportZoomInto())
.setSupportZoomInto(supportZoomInfo)
.trackField(field);

logger.trace("Built layout element field for {}: {}", field, layoutElementFieldBuilder);
Expand Down

0 comments on commit c813dd8

Please sign in to comment.