activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [27/29] git commit: [AMQ-4174] Redirect back to queue overview after delete/moving message Patch from Robert Balent applied
Date Thu, 20 Mar 2014 17:44:38 GMT
[AMQ-4174] Redirect back to queue overview after delete/moving message
Patch from Robert Balent applied


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/4d553b28
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/4d553b28
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/4d553b28

Branch: refs/heads/activemq-5.9
Commit: 4d553b28af8f30f69fb2fe3c88a35d23b4dc244c
Parents: 0280acf
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Feb 5 15:19:44 2014 -0500
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Thu Mar 20 13:15:56 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/web/controller/CopyMessage.java   | 2 +-
 .../java/org/apache/activemq/web/controller/DeleteMessage.java | 2 +-
 .../java/org/apache/activemq/web/controller/MoveMessage.java   | 2 +-
 activemq-web-console/src/main/webapp/message.jsp               | 6 +++---
 .../main/java/org/apache/activemq/web/DestinationFacade.java   | 4 ++++
 5 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/4d553b28/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
----------------------------------------------------------------------
diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
index 3a82898..178eadd 100644
--- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
+++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CopyMessage.java
@@ -49,7 +49,7 @@ public class CopyMessage extends DestinationFacade implements Controller
{
             	log.warn("No queue named: " + getPhysicalDestinationName());
             }
         }
-        return redirectToBrowseView();
+        return redirectToDestinationView();
     }
 
     public String getMessageId() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/4d553b28/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
----------------------------------------------------------------------
diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
index 1f060fe..d9bf009 100644
--- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
+++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
@@ -48,7 +48,7 @@ public class DeleteMessage extends DestinationFacade implements Controller
{
             	log.warn("No queue named: " + getPhysicalDestinationName());
             }
         }
-        return redirectToBrowseView();
+        return redirectToDestinationView();
     }
 
     public String getMessageId() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/4d553b28/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
----------------------------------------------------------------------
diff --git a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
index 2155382..5a49165 100644
--- a/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
+++ b/activemq-web-console/src/main/java/org/apache/activemq/web/controller/MoveMessage.java
@@ -49,7 +49,7 @@ public class MoveMessage extends DestinationFacade implements Controller
{
             	log.warn("No queue named: " + getPhysicalDestinationName());
             }
         }
-        return redirectToBrowseView();
+        return redirectToDestinationView();
     }
 
     public String getMessageId() {

http://git-wip-us.apache.org/repos/asf/activemq/blob/4d553b28/activemq-web-console/src/main/webapp/message.jsp
----------------------------------------------------------------------
diff --git a/activemq-web-console/src/main/webapp/message.jsp b/activemq-web-console/src/main/webapp/message.jsp
index be4e14f..cc5ff0c 100644
--- a/activemq-web-console/src/main/webapp/message.jsp
+++ b/activemq-web-console/src/main/webapp/message.jsp
@@ -133,10 +133,10 @@ No message could be found for ID <c:out value="${requestContext.messageQuery.id}
                 </thead>
                 <tbody>
                     <tr>
-                        <td colspan="2"><a href="deleteMessage.action?JMSDestination=<c:out
value="${row.JMSDestination}" />&messageId=${row.JMSMessageID}&secret=<c:out
value='${sessionScope["secret"]}'/>">Delete</a></td>
+                        <td colspan="2"><a href="deleteMessage.action?JMSDestination=<c:out
value="${requestContext.messageQuery.JMSDestination}" />&messageId=${row.JMSMessageID}&secret=<c:out
value='${sessionScope["secret"]}'/>">Delete</a></td>
                     </tr>
                     <tr class="odd">
-                    <td><a href="javascript:confirmAction('queue', 'copyMessage.action?destination=%target%&JMSDestination=<c:out
value="${row.JMSDestination}" />&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=<c:out
value='${sessionScope["secret"]}'/>')">Copy</a></td>
+                    <td><a href="javascript:confirmAction('queue', 'copyMessage.action?destination=%target%&JMSDestination=<c:out
value="${requestContext.messageQuery.JMSDestination}" />&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=<c:out
value='${sessionScope["secret"]}'/>')">Copy</a></td>
                         <td rowspan="2">
                             <select id="queue">
                                 <option value=""> -- Please select --</option>
@@ -150,7 +150,7 @@ No message could be found for ID <c:out value="${requestContext.messageQuery.id}
 
                     </tr>
                     <tr class="odd">
-                        <td><a href="javascript:confirmAction('queue', 'moveMessage.action?destination=%target%&JMSDestination=<c:out
value="${row.JMSDestination}" />&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=<c:out
value='${sessionScope["secret"]}'/>')">Move</a></td>
+                        <td><a href="javascript:confirmAction('queue', 'moveMessage.action?destination=%target%&JMSDestination=<c:out
value="${requestContext.messageQuery.JMSDestination}" />&messageId=${row.JMSMessageID}&JMSDestinationType=queue&secret=<c:out
value='${sessionScope["secret"]}'/>')">Move</a></td>
                     </tr>
                 </tbody>
             </table>

http://git-wip-us.apache.org/repos/asf/activemq/blob/4d553b28/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java
----------------------------------------------------------------------
diff --git a/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java b/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java
index 7e4e548..367f110 100644
--- a/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java
+++ b/activemq-web/src/main/java/org/apache/activemq/web/DestinationFacade.java
@@ -128,6 +128,10 @@ public class DestinationFacade {
         return new ModelAndView("redirect:" + (isQueue() ? "queues.jsp" : "topics.jsp"));
     }
 
+    protected ModelAndView redirectToDestinationView() {        
+        return new ModelAndView("redirect:browse.jsp?JMSDestination=" + jmsDestination);
+    }
+
     protected String getPhysicalDestinationName() {
         return createDestination().getPhysicalName();
     }


Mime
View raw message