diff --git a/pepdb/src/org/scharp/atlas/pepdb/PepDBBaseController.java b/pepdb/src/org/scharp/atlas/pepdb/PepDBBaseController.java
index 78b687f0..829b57ef 100644
--- a/pepdb/src/org/scharp/atlas/pepdb/PepDBBaseController.java
+++ b/pepdb/src/org/scharp/atlas/pepdb/PepDBBaseController.java
@@ -17,7 +17,7 @@
import org.labkey.api.util.DateUtil;
import org.labkey.api.util.HtmlString;
import org.labkey.api.util.HtmlStringBuilder;
-import org.labkey.api.util.Link;
+import org.labkey.api.util.LinkBuilder;
import org.labkey.api.view.ActionURL;
import org.labkey.api.writer.HtmlWriter;
import org.scharp.atlas.pepdb.model.PeptideGroup;
@@ -26,8 +26,6 @@
import org.scharp.atlas.pepdb.model.ProteinCategory;
import org.springframework.validation.Errors;
-import java.io.IOException;
-import java.io.Writer;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
@@ -452,10 +450,9 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
Integer peptideId = (Integer) rowMap.get(c.getName());
try
{
- new Link.LinkBuilder("P" + peptideId).clearClasses()
+ LinkBuilder.simpleLink("P" + peptideId, new ActionURL(PepDBController.DisplayPeptideAction.class, getContainer())
+ .addParameter(PepDBSchema.COLUMN_PEPTIDE_ID, peptideId))
.target("_self")
- .href(new ActionURL(PepDBController.DisplayPeptideAction.class, getContainer())
- .addParameter(PepDBSchema.COLUMN_PEPTIDE_ID, peptideId))
.build()
.appendTo(out);
}
@@ -528,10 +525,9 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
Integer peptidePoolId = (Integer) rowMap.get(c.getName());
try
{
- new Link.LinkBuilder("PP" + peptidePoolId).clearClasses()
+ LinkBuilder.simpleLink("PP" + peptidePoolId, new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
+ .addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, peptidePoolId))
.target("_self")
- .href(new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
- .addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, peptidePoolId))
.build()
.appendTo(out);
}
@@ -606,10 +602,9 @@ public void renderGridCellContents(RenderContext ctx, HtmlWriter out)
{
if(parentPoolId != null)
{
- new Link.LinkBuilder("PP" + parentPoolId).clearClasses()
+ LinkBuilder.simpleLink("PP" + parentPoolId, new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
+ .addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, parentPoolId))
.target("_self")
- .href(new ActionURL(PepDBController.DisplayPeptidePoolInformationAction.class, getContainer())
- .addParameter(PepDBSchema.COLUMN_PEPTIDE_POOL_ID, parentPoolId))
.build()
.appendTo(out);
}
diff --git a/pepdb/src/org/scharp/atlas/pepdb/view/index.jsp b/pepdb/src/org/scharp/atlas/pepdb/view/index.jsp
index dcd0a34b..7b0dfec2 100644
--- a/pepdb/src/org/scharp/atlas/pepdb/view/index.jsp
+++ b/pepdb/src/org/scharp/atlas/pepdb/view/index.jsp
@@ -16,23 +16,23 @@
If you need to enter any data contact Atlas Administrator.
Peptide Groups :
- - <%= link("List Peptide Groups").href(urlFor(PepDBController.ShowAllPeptideGroupsAction.class)).clearClasses() %>
+ - <%= simpleLink("List Peptide Groups", urlFor(PepDBController.ShowAllPeptideGroupsAction.class)) %>
<%
if(canUpdate){%>
- - <%= link("Insert a New Group").href(urlFor(PepDBController.InsertPeptideGroupAction.class)).clearClasses() %>
+ - <%= simpleLink("Insert a New Group", urlFor(PepDBController.InsertPeptideGroupAction.class)) %>
<%}else{%>
- Insert a New Group
<%}%>
Peptides :
- - <%= link("Search for Peptides by Criteria").href(urlFor(PepDBController.SearchForPeptidesAction.class)).clearClasses() %>
+ - <%= simpleLink("Search for Peptides by Criteria", urlFor(PepDBController.SearchForPeptidesAction.class)) %>
<%if(canUpdate){%>
- - <%= link("Import Peptides").href(urlFor(PepDBController.ImportPeptidesAction.class)).clearClasses() %>
+ - <%= simpleLink("Import Peptides", urlFor(PepDBController.ImportPeptidesAction.class)) %>
<%}else{%>
- Import Peptides
<%}%>
- - <%= link("Peptides From Last Import").href(urlFor(PepDBController.DisplayResultAction.class)).clearClasses() %>
+ - <%= simpleLink("Peptides From Last Import", urlFor(PepDBController.DisplayResultAction.class)) %>
<%
@@ -45,9 +45,9 @@ Lookup Peptide by Id: Peptide Pools :
<%if(canUpdate){%>
- - <%= link("Import Peptide Pools").href(urlFor(PepDBController.ImportPeptidePoolsAction.class)).clearClasses() %>
+ - <%= simpleLink("Import Peptide Pools", urlFor(PepDBController.ImportPeptidePoolsAction.class)) %>
<%}else{%>
- Import Peptide Pools
<%}%>
- - <%= link("List All Peptide Pools").href(urlFor(PepDBController.ShowAllPeptidePoolsAction.class)).clearClasses() %>
+ - <%= simpleLink("List All Peptide Pools", urlFor(PepDBController.ShowAllPeptidePoolsAction.class)) %>
diff --git a/pepdb/src/org/scharp/atlas/pepdb/view/peptideDetails.jsp b/pepdb/src/org/scharp/atlas/pepdb/view/peptideDetails.jsp
index d14905dd..18dcfffe 100644
--- a/pepdb/src/org/scharp/atlas/pepdb/view/peptideDetails.jsp
+++ b/pepdb/src/org/scharp/atlas/pepdb/view/peptideDetails.jsp
@@ -23,8 +23,8 @@
|
- <%= link(source.getPeptide_group_name()).href(urlFor(PepDBController.DisplayPeptideGroupInformationAction.class)
- .addParameter("peptide_group_id", source.getPeptide_group_id().toString())).clearClasses() %>
+ <%= simpleLink(source.getPeptide_group_name(), urlFor(PepDBController.DisplayPeptideGroupInformationAction.class)
+ .addParameter("peptide_group_id", source.getPeptide_group_id().toString())) %>
(PEPTIDE NUMBER =<%=h(source.getPeptide_id_in_group())%>)
<%if(source.getFrequency_number() != null){%>
- Frequency Number =
@@ -47,8 +47,8 @@
{%>
|
|
- <%= link("PP"+pool.getPeptide_pool_id()).href(urlFor(PepDBController.DisplayPeptidePoolInformationAction.class)
- .addParameter("peptide_pool_id", pool.getPeptide_pool_id())).clearClasses() %> -
+ <%= simpleLink("PP"+pool.getPeptide_pool_id(), urlFor(PepDBController.DisplayPeptidePoolInformationAction.class)
+ .addParameter("peptide_pool_id", pool.getPeptide_pool_id())) %> -
<%=h(pool.getPeptide_pool_name())%>
<%=h(pool.getPool_type_desc())%>
|