[MRM-1111] accommodate that Struts no longer populates the parameters from the action mapping

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1091440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2011-04-12 14:57:09 +00:00
parent 86ed5afc5c
commit 465c52bdca
2 changed files with 17 additions and 8 deletions

View File

@ -94,7 +94,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Info</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Info</my:currentWWUrl>
<c:set var="url"> <c:set var="url">
<s:url action="showArtifactDependencies"> <s:url action="showArtifactDependencies">
<s:param name="groupId" value="%{groupId}"/> <s:param name="groupId" value="%{groupId}"/>
@ -102,7 +102,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Dependencies</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Dependencies</my:currentWWUrl>
<c:set var="url"> <c:set var="url">
<s:url action="showArtifactDependencyTree"> <s:url action="showArtifactDependencyTree">
<s:param name="groupId" value="%{groupId}"/> <s:param name="groupId" value="%{groupId}"/>
@ -110,7 +110,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Dependency Tree</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Dependency Tree</my:currentWWUrl>
<c:set var="url"> <c:set var="url">
<s:url action="showArtifactDependees"> <s:url action="showArtifactDependees">
<s:param name="groupId" value="%{groupId}"/> <s:param name="groupId" value="%{groupId}"/>
@ -118,7 +118,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Used By</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Used By</my:currentWWUrl>
<c:set var="url"> <c:set var="url">
<s:url action="showArtifactMailingLists"> <s:url action="showArtifactMailingLists">
<s:param name="groupId" value="%{groupId}"/> <s:param name="groupId" value="%{groupId}"/>
@ -126,7 +126,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Mailing Lists</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Mailing Lists</my:currentWWUrl>
<c:set var="url"> <c:set var="url">
<s:url action="showProjectMetadata"> <s:url action="showProjectMetadata">
<s:param name="groupId" value="%{groupId}"/> <s:param name="groupId" value="%{groupId}"/>
@ -134,7 +134,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Metadata</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Metadata</my:currentWWUrl>
<%-- TODO <%-- TODO
<redback:ifAnyAuthorized permissions="archiva-access-reports"> <redback:ifAnyAuthorized permissions="archiva-access-reports">
<c:set var="url"> <c:set var="url">
@ -144,7 +144,7 @@
<s:param name="version" value="%{version}"/> <s:param name="version" value="%{version}"/>
</s:url> </s:url>
</c:set> </c:set>
<my:currentWWUrl url="${url}">Reports</my:currentWWUrl> <my:currentWWUrl url="${url}" useParams="true">Reports</my:currentWWUrl>
</redback:ifAnyAuthorized> </redback:ifAnyAuthorized>
--%> --%>

View File

@ -22,9 +22,16 @@
<%@ attribute name="action" %> <%@ attribute name="action" %>
<%@ attribute name="namespace" %> <%@ attribute name="namespace" %>
<%@ attribute name="url" %> <%@ attribute name="url" %>
<%@ attribute name="useParams" required="false" %>
<c:set var="currentUrl"> <c:set var="currentUrl">
<s:url/> <s:url>
<c:if test="${useParams}">
<s:param name="groupId" value="%{groupId}"/>
<s:param name="artifactId" value="%{artifactId}"/>
<s:param name="version" value="%{version}"/>
</c:if>
</s:url>
</c:set> </c:set>
<c:if test="${!empty (action) && !empty (namespace)}"> <c:if test="${!empty (action) && !empty (namespace)}">
<c:set var="url"> <c:set var="url">
@ -34,6 +41,8 @@
<c:set var="text"> <c:set var="text">
<jsp:doBody/> <jsp:doBody/>
</c:set> </c:set>
<!--URL: <c:out value="${url}"/>
Current URL: <c:out value="${currentUrl}"/> -->
<c:choose> <c:choose>
<c:when test="${currentUrl == url}"> <c:when test="${currentUrl == url}">
<b> <b>