Author: tyrell
Date: Sat Jan 19 11:19:37 2008
New Revision: 12521

Log:

Correcting some parameter passing issues, which made some task links not 
appearing at all.

Modified:
   trunk/mashup/java/modules/www/mashup.jsp
   trunk/mashup/java/modules/www/taskbar.jsp

Modified: trunk/mashup/java/modules/www/mashup.jsp
==============================================================================
--- trunk/mashup/java/modules/www/mashup.jsp    (original)
+++ trunk/mashup/java/modules/www/mashup.jsp    Sat Jan 19 11:19:37 2008
@@ -231,8 +231,7 @@
 <%@ include file="searchbox.jsp" %>
 
 <div id="taskbar">
-    <jsp:include page="taskbar.jsp">
-        <jsp:param name="author" value="<%=author%>"/>
+    <jsp:include page="taskbar.jsp">              
         <jsp:param name="currentUser" value="<%=currentUser%>"/>
         <jsp:param name="mashupServiceName" value="<%=mashupServiceName%>"/>
         <jsp:param name="path" value="<%=path%>"/>

Modified: trunk/mashup/java/modules/www/taskbar.jsp
==============================================================================
--- trunk/mashup/java/modules/www/taskbar.jsp   (original)
+++ trunk/mashup/java/modules/www/taskbar.jsp   Sat Jan 19 11:19:37 2008
@@ -58,17 +58,24 @@
 
 <%
     //Setting variables required for the taskbar.jsp
-    String paramAuthor = request.getParameter("paramAuthor");
-    String paramCurrentUser = request.getParameter("paramCurrentUser");
-    String paramMashupServiceName = 
request.getParameter("paramMashupServiceName");
-    String paramPath = request.getParameter("paramPath");
+    String paramCurrentUser = request.getParameter("currentUser");
+    String paramMashupServiceName = request.getParameter("mashupServiceName");
+    String paramPath = request.getParameter("path");
 
     String thisPage = request.getParameter("thisPage");
-    if(thisPage == null){
+    if (thisPage == null) {
         thisPage = "index.jsp";
     }
 
     Registry registry = RegistryUtils.getRegistry(request);
+
+    //Getting the mashup author
+    String author = null;
+    if (paramPath != null) {
+        Resource resource = registry.get(paramPath);
+        author = resource.getAuthorUserName();
+    }
+
 %>
 <table width="100%" border="0" class="box" cellspacing="0" cellpadding="3">
 <tr>
@@ -82,7 +89,8 @@
 <ul>
 <!--Will be available only to users with Admin priviledges OR who are Authors 
of the current Mashup, if there is a Mashup service set by the parent page.-->
 <% if (((RegistryUtils.isAdminRole(registry)) ||
-        (paramAuthor != null && 
paramAuthor.equalsIgnoreCase(paramCurrentUser))) && (paramMashupServiceName != 
null)) { %>
+        (author != null && author.equalsIgnoreCase(paramCurrentUser))) &&
+        (paramMashupServiceName != null)) { %>
 <li id="service-status">
     Service status not available
 </li>
@@ -263,7 +271,7 @@
 </li>
 <% } %>
 
-<%  String linkedName = request.getParameter("name");
+<% String linkedName = request.getParameter("name");
     if (RegistryUtils.getCurrentUser(registry).equals(linkedName)) { %>
 <li>
     Register your <a href="infocard.jsp">infocard</a>

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to