Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.view.HttpView;
import org.labkey.api.view.template.ClientDependency;
import org.labkey.api.writer.HtmlWriter;

import java.io.IOException;
import java.io.Writer;
Expand Down Expand Up @@ -38,10 +39,10 @@ public DisplayColumn createRenderer(ColumnInfo colInfo)
private boolean _handlerRegistered = false;

@Override
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException
{
Object val = ctx.get(FieldKey.fromString(getBoundColumn().getFieldKey().getParent(), "rowId"));
out.write(PageFlowUtil.link("Download Sequence").attributes(Map.of(
oldWriter.write(PageFlowUtil.link("Download Sequence").attributes(Map.of(
"data-rowid", val.toString()
)).addClass("sdc-row").toString());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.labkey.api.data.DisplayColumnFactory;
import org.labkey.api.data.RenderContext;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.writer.HtmlWriter;

import java.io.IOException;
import java.io.Writer;
Expand All @@ -26,7 +27,7 @@ public DisplayColumn createRenderer(ColumnInfo colInfo)
DataColumn ret = new DataColumn(colInfo)
{
@Override
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException
{
Object val = ctx.get(getBoundColumn().getFieldKey());
if (val != null)
Expand All @@ -35,7 +36,7 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep
String delim = "";
for (String v : vals)
{
out.write(delim + "<a href=" + getFormattedURL(v) + ">" + PageFlowUtil.encode(v) + "</a>");
oldWriter.write(delim + "<a href=" + getFormattedURL(v) + ">" + PageFlowUtil.encode(v) + "</a>");
delim = "; ";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.labkey.api.view.ActionURL;
import org.labkey.api.view.HttpView;
import org.labkey.api.view.template.ClientDependency;
import org.labkey.api.writer.HtmlWriter;
import org.labkey.sequenceanalysis.SequenceAnalysisSchema;

import java.io.IOException;
Expand Down Expand Up @@ -258,7 +259,7 @@ private FieldKey getBoundKey(String colName)
}

@Override
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException
{
Integer rowId = ctx.get(getBoundKey("rowId"), Integer.class);
if (rowId != null)
Expand All @@ -273,12 +274,12 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep
ActionURL url = QueryService.get().urlFor(ctx.getViewContext().getUser(), ctx.getContainer(), QueryAction.executeQuery, SequenceAnalysisSchema.SCHEMA_NAME, SequenceAnalysisSchema.TABLE_OUTPUTFILES);
url.addParameter("query.fileSets~contains", token);

out.write(delim + "<a href=\"" + url.getURIString() + "\"" + ">" + token + "</a>");
oldWriter.write(delim + "<a href=\"" + url.getURIString() + "\"" + ">" + token + "</a>");
delim = ",<br>";
}
}

out.write("<a class=\"fa fa-pencil lk-dr-action-icon sfs-row\" data-tt=\"tooltip\" data-rowid=\"" + rowId +"\" data-original-title=\"add/edit\"></a>");
oldWriter.write("<a class=\"fa fa-pencil lk-dr-action-icon sfs-row\" data-tt=\"tooltip\" data-rowid=\"" + rowId +"\" data-original-title=\"add/edit\"></a>");

if (!_handlerRegistered)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.labkey.api.sequenceanalysis.pipeline.SequenceOutputHandler;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.view.ActionURL;
import org.labkey.api.writer.HtmlWriter;
import org.labkey.sequenceanalysis.SequenceAnalysisSchema;
import org.labkey.sequenceanalysis.SequenceAnalysisServiceImpl;

Expand Down Expand Up @@ -259,21 +260,21 @@ public DisplayColumn createRenderer(ColumnInfo colInfo)
return new DataColumn(colInfo)
{
@Override
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException
{
Object o = getValue(ctx);
if (o != null)
{
ActionURL url = QueryService.get().urlFor(getUser(), ctx.getContainer(), QueryAction.executeQuery, SequenceAnalysisSchema.SCHEMA_NAME, SequenceAnalysisSchema.TABLE_READ_DATA);
url.addFilter("query", FieldKey.fromString("readset"), CompareType.EQUAL, o);

out.write("<a class=\"labkey-text-link\" href=\"" + url + "\">");
out.write("View File(s)");
out.write("</a>");
oldWriter.write("<a class=\"labkey-text-link\" href=\"" + url + "\">");
oldWriter.write("View File(s)");
oldWriter.write("</a>");
}
else
{
out.write("No Files");
oldWriter.write("No Files");
}
}
};
Expand Down Expand Up @@ -448,7 +449,7 @@ public DisplayColumn createRenderer(ColumnInfo colInfo)
return new DataColumn(colInfo)
{
@Override
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException
{
String result = StringUtils.trimToNull(super.getFormattedHtml(ctx).toString());
String delim = "";
Expand All @@ -459,7 +460,7 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep
{
String url = DetailsURL.fromString(_baseUrl + PageFlowUtil.encode(token), ctx.getContainer()).getActionURL().toString();

out.write(delim + "<a href=\"" + url + "\">" + token + "</a>");
oldWriter.write(delim + "<a href=\"" + url + "\">" + token + "</a>");
delim = "<br>";
}
}
Expand Down