Author: tyrell
Date: Tue Apr 15 21:44:05 2008
New Revision: 15693

Log:

Fixing MASHUP-750

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

Added: trunk/mashup/java/modules/www/ajax_announcements.jsp
==============================================================================
--- (empty file)
+++ trunk/mashup/java/modules/www/ajax_announcements.jsp        Tue Apr 15 
21:44:05 2008
@@ -0,0 +1,29 @@
+<%--
+ * Copyright 2006,2007 WSO2, Inc. http://www.wso2.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+--%>
+
+<%@ page import="org.wso2.mashup.utils.MashupUtils" %>
+<%@ page import="org.wso2.mashup.webapp.utils.RegistryUtils" %>
+
+<jsp:useBean id="announcementsFetcher" 
class="org.wso2.registry.announcement.Announcement"  scope="application"/>
+
+<%
+    //Preprocessing fetched announcements to check for null
+    String announcement = 
announcementsFetcher.get(MashupUtils.getServerUUID(), 
RegistryUtils.getAnnouncementsUrl());
+    if (announcement == null) {
+        announcement = "";
+    }
+%>
+<%=announcement%>

Modified: trunk/mashup/java/modules/www/taskbar.jsp
==============================================================================
--- trunk/mashup/java/modules/www/taskbar.jsp   (original)
+++ trunk/mashup/java/modules/www/taskbar.jsp   Tue Apr 15 21:44:05 2008
@@ -19,7 +19,7 @@
 <%@ page import="org.wso2.registry.*" %>
 <%@ page import="java.util.*" %>
 
-<jsp:useBean id="announcementsFetcher" 
class="org.wso2.registry.announcement.Announcement"  scope="application"/>
+
 
 <%
     ResourceBundle bundle = ResourceBundle.getBundle("UI");
@@ -297,12 +297,20 @@
     </div>
     <div class="rbbot"><div class="bg"><div class="rbFooter"></div></div></div>
 </div>
-<%
-    //Preprocessing fetched announcements to check for null
-    String announcement = 
announcementsFetcher.get(MashupUtils.getServerUUID(), 
RegistryUtils.getAnnouncementsUrl());
-    if (announcement == null) {
-        announcement = "";
-    }
-%>
-<div id="announcements"><%=announcement%></div>
 
+<div id="announcements"></div>
+
+<script type="text/javascript" language="JavaScript">
+    new Ajax.Request("ajax_announcements.jsp", {
+        method: "post",
+        parameters: {
+          
+        },
+        onSuccess: function (transport) {
+            document.getElementById("announcements").innerHTML = 
transport.responseText;
+        },
+        onFailure: function (transport) {
+           //Do nothing
+        }
+    });
+</script>
\ No newline at end of file

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

Reply via email to