Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions api/src/org/labkey/api/data/JsonWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,19 @@ else if (cinfo.getFacetingBehaviorType() != null)
}

if (dc instanceof IMultiValuedDisplayColumn)
{
props.put("multiValue", true);
if (dc instanceof ILineageDisplayColumn lineageCol)
{
// Issue 52878: Attachment thumbnails from Source Types do not render
ColumnInfo innerCol = lineageCol.getInnerBoundColumn();
if (innerCol != null)
{
props.put("align", innerCol.getTextAlign());
props.put("inputType", innerCol.getInputType());
}
}
}

if (null != cinfo)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.labkey.api.data.RenderContext;
import org.labkey.api.query.FieldKey;
import org.labkey.api.util.HtmlString;
import org.labkey.api.writer.HtmlWriter;

import java.util.Set;

Expand Down Expand Up @@ -120,6 +121,20 @@ public String renderURL(RenderContext ctx)
return super.renderURL(ctx);
}

@Override
public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
{
Integer lookupKey = getLookupId(ctx);

if (_dc != null && lookupKey != null && lookupKey > 0)
{
_dc.renderGridCellContents(ctx, out);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where this comment belongs (likely not related to this code changes), but when I tried to setup the case locally where I have a sample type grid and customize the view to pull in the "Input/Data/sourcetype/attachment column" case, the result was an empty grid rendering in the app:

Image

When I did this same setup on nightly, it rendered as described in the issue with all expected grid rows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this again on develop and got the same behavior, so definitely unrelated to changes in this PR.
Turns out the issue was that the source type had an invalid calculated field. So when I tried to add it to any of the sample type grids, it had the same result. Removing that bad calculated field fixed things.

}

super.renderGridCellContents(ctx, out);
}

@Override
public void addQueryFieldKeys(Set<FieldKey> keys)
{
Expand Down