|
31 | 31 | import org.labkey.api.query.SimpleUserSchema; |
32 | 32 | import org.labkey.api.security.User; |
33 | 33 | import org.labkey.api.sequenceanalysis.pipeline.SequenceOutputHandler; |
| 34 | +import org.labkey.api.util.HtmlString; |
34 | 35 | import org.labkey.api.util.PageFlowUtil; |
35 | 36 | import org.labkey.api.view.ActionURL; |
36 | 37 | import org.labkey.api.writer.HtmlWriter; |
37 | 38 | import org.labkey.sequenceanalysis.SequenceAnalysisSchema; |
38 | 39 | import org.labkey.sequenceanalysis.SequenceAnalysisServiceImpl; |
39 | 40 |
|
40 | | -import java.io.IOException; |
41 | | -import java.io.Writer; |
42 | 41 | import java.util.Arrays; |
43 | 42 | import java.util.LinkedHashSet; |
44 | 43 |
|
@@ -260,21 +259,19 @@ public DisplayColumn createRenderer(ColumnInfo colInfo) |
260 | 259 | return new DataColumn(colInfo) |
261 | 260 | { |
262 | 261 | @Override |
263 | | - public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException |
| 262 | + public void renderGridCellContents(RenderContext ctx, HtmlWriter out) |
264 | 263 | { |
265 | 264 | Object o = getValue(ctx); |
266 | 265 | if (o != null) |
267 | 266 | { |
268 | 267 | ActionURL url = QueryService.get().urlFor(getUser(), ctx.getContainer(), QueryAction.executeQuery, SequenceAnalysisSchema.SCHEMA_NAME, SequenceAnalysisSchema.TABLE_READ_DATA); |
269 | 268 | url.addFilter("query", FieldKey.fromString("readset"), CompareType.EQUAL, o); |
270 | 269 |
|
271 | | - oldWriter.write("<a class=\"labkey-text-link\" href=\"" + url + "\">"); |
272 | | - oldWriter.write("View File(s)"); |
273 | | - oldWriter.write("</a>"); |
| 270 | + out.write(PageFlowUtil.link("View File(s)").href(url).addClass("labkey-text-link")); |
274 | 271 | } |
275 | 272 | else |
276 | 273 | { |
277 | | - oldWriter.write("No Files"); |
| 274 | + out.write("No Files"); |
278 | 275 | } |
279 | 276 | } |
280 | 277 | }; |
@@ -449,19 +446,20 @@ public DisplayColumn createRenderer(ColumnInfo colInfo) |
449 | 446 | return new DataColumn(colInfo) |
450 | 447 | { |
451 | 448 | @Override |
452 | | - public void renderGridCellContents(RenderContext ctx, Writer oldWriter, HtmlWriter out) throws IOException |
| 449 | + public void renderGridCellContents(RenderContext ctx, HtmlWriter out) |
453 | 450 | { |
454 | 451 | String result = StringUtils.trimToNull(super.getFormattedHtml(ctx).toString()); |
455 | | - String delim = ""; |
| 452 | + HtmlString delim = HtmlString.EMPTY_STRING; |
456 | 453 | if (result != null) |
457 | 454 | { |
458 | 455 | String[] tokens = result.split(","); |
459 | 456 | for (String token : tokens) |
460 | 457 | { |
461 | | - String url = DetailsURL.fromString(_baseUrl + PageFlowUtil.encode(token), ctx.getContainer()).getActionURL().toString(); |
| 458 | + ActionURL url = DetailsURL.fromString(_baseUrl + PageFlowUtil.encode(token), ctx.getContainer()).getActionURL(); |
462 | 459 |
|
463 | | - oldWriter.write(delim + "<a href=\"" + url + "\">" + token + "</a>"); |
464 | | - delim = "<br>"; |
| 460 | + out.write(delim); |
| 461 | + out.write(PageFlowUtil.link(token).href(url)); |
| 462 | + delim = HtmlString.BR; |
465 | 463 | } |
466 | 464 | } |
467 | 465 | } |
|
0 commit comments