|
23 | 23 | import org.labkey.api.data.SimpleFilter; |
24 | 24 | import org.labkey.api.data.TableInfo; |
25 | 25 | import org.labkey.api.query.FieldKey; |
26 | | -import org.labkey.api.util.PageFlowUtil; |
| 26 | +import org.labkey.api.util.Link; |
27 | 27 | import org.labkey.api.view.ActionURL; |
| 28 | +import org.labkey.api.writer.HtmlWriter; |
28 | 29 |
|
29 | | -import java.io.IOException; |
30 | | -import java.io.Writer; |
31 | 30 | import java.util.List; |
32 | 31 | import java.util.Set; |
33 | 32 |
|
34 | 33 | /** |
35 | 34 | * Render the concatenated haplotypes with each value linking to the haplotype definition list, if configured |
36 | | - * Created by: jeckels |
37 | | - * Date: 4/12/15 |
38 | 35 | */ |
39 | 36 | public class ConcatenatedHaplotypesDisplayColumn extends DataColumn |
40 | 37 | { |
@@ -66,7 +63,7 @@ private FieldKey getSpeciesFieldKey() |
66 | 63 | } |
67 | 64 |
|
68 | 65 | @Override |
69 | | - public void renderGridCellContents(RenderContext ctx, Writer out) throws IOException |
| 66 | + public void renderGridCellContents(RenderContext ctx, HtmlWriter out) |
70 | 67 | { |
71 | 68 | Object o = getValue(ctx); |
72 | 69 | if (o == null) |
@@ -105,14 +102,8 @@ public void renderGridCellContents(RenderContext ctx, Writer out) throws IOExcep |
105 | 102 | } |
106 | 103 | filter.applyToURL(url, "query"); |
107 | 104 | 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()); |
113 | 106 | } |
114 | 107 | } |
115 | 108 | } |
116 | | - |
117 | | - |
118 | 109 | } |
0 commit comments