Skip to content

Commit 6585d79

Browse files
committed
Migrate renderGridCellContents() and renderDetailsCellContents()
1 parent cb16e78 commit 6585d79

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

laboratory/src/org/labkey/laboratory/query/EnterResultsDisplayColumn.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ public String renderURL(RenderContext ctx)
4949
}
5050

5151
@Override
52-
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
52+
public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException
5353
{
5454
Object value = getValue(ctx);
5555
String url = renderURL(ctx);
5656

5757
if (value != null && url != null)
5858
{
59-
out.write(PageFlowUtil.link(value.toString()).href(url).target(_linkTarget).toString());
59+
oldWriter.write(PageFlowUtil.link(value.toString()).href(url).target(_linkTarget).toString());
6060
}
6161
}
6262

laboratory/src/org/labkey/laboratory/query/WorkbookIdDisplayColumn.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import org.labkey.api.data.ColumnInfo;
44
import org.labkey.api.data.DataColumn;
55
import org.labkey.api.data.RenderContext;
6-
7-
import java.io.IOException;
8-
import java.io.Writer;
6+
import org.labkey.api.writer.HtmlWriter;
97

108
/**
119
* User: bimber
@@ -20,9 +18,9 @@ public WorkbookIdDisplayColumn(ColumnInfo col)
2018
}
2119

2220
@Override
23-
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
21+
public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
2422
{
25-
//if the lookup is broken, dont render a value
23+
//if the lookup is broken, don't render a value
2624
Object dv = getDisplayValue(ctx);
2725
if (dv == null || "".equals(dv))
2826
return;
@@ -35,7 +33,7 @@ public Object getDisplayValue(RenderContext ctx)
3533
{
3634
Object ret = super.getDisplayValue(ctx);
3735

38-
//if the lookup is broken, dont render a value. note: return empty string so client API draws the distinction between deliberately empty and a genuine NULL value
36+
//if the lookup is broken, don't render a value. note: return empty string so client API draws the distinction between deliberately empty and a genuine NULL value
3937
return ret == null ? "" : ret;
4038
}
4139
}

0 commit comments

Comments
 (0)