Skip to content

Commit d6980ec

Browse files
authored
Migrate renderGridCellContents() and renderDetailsCellContents() (#159)
1 parent c91e21d commit d6980ec

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

genotyping/src/org/labkey/genotyping/ConcatenatedHaplotypesDisplayColumn.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,15 @@
2323
import org.labkey.api.data.SimpleFilter;
2424
import org.labkey.api.data.TableInfo;
2525
import org.labkey.api.query.FieldKey;
26-
import org.labkey.api.util.PageFlowUtil;
26+
import org.labkey.api.util.Link;
2727
import org.labkey.api.view.ActionURL;
28+
import org.labkey.api.writer.HtmlWriter;
2829

29-
import java.io.IOException;
30-
import java.io.Writer;
3130
import java.util.List;
3231
import java.util.Set;
3332

3433
/**
3534
* Render the concatenated haplotypes with each value linking to the haplotype definition list, if configured
36-
* Created by: jeckels
37-
* Date: 4/12/15
3835
*/
3936
public class ConcatenatedHaplotypesDisplayColumn extends DataColumn
4037
{
@@ -66,7 +63,7 @@ private FieldKey getSpeciesFieldKey()
6663
}
6764

6865
@Override
69-
public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException
66+
public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
7067
{
7168
Object o = getValue(ctx);
7269
if (o == null)
@@ -105,14 +102,8 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep
105102
}
106103
filter.applyToURL(url, "query");
107104
String evaluatedURL = url.getURIString();
108-
out.write("<a target=\"_blank\" href=\"");
109-
out.write(PageFlowUtil.filter(evaluatedURL));
110-
out.write("\">");
111-
out.write(PageFlowUtil.filter(haplotype));
112-
out.write("</a>");
105+
out.write(new Link.LinkBuilder(haplotype).href(evaluatedURL).target("_blank").clearClasses());
113106
}
114107
}
115108
}
116-
117-
118109
}

0 commit comments

Comments
 (0)