rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1098757 - in /incubator/rave/trunk/rave-portal/src/main: java/org/apache/rave/portal/web/controller/ resources/ webapp/WEB-INF/ webapp/WEB-INF/views/ webapp/script/
Date Mon, 02 May 2011 19:24:16 GMT
Author: mfranklin
Date: Mon May  2 19:24:15 2011
New Revision: 1098757

URL: http://svn.apache.org/viewvc?rev=1098757&view=rev
Log:
Refactored servlet mappings to support static resources 
Added common properties for OpenSocial gadget rendering (supports RAVE-19)

Added:
    incubator/rave/trunk/rave-portal/src/main/resources/portal.properties
    incubator/rave/trunk/rave-portal/src/main/webapp/script/
    incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js
Modified:
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/HomeController.java
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/HomeController.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/HomeController.java?rev=1098757&r1=1098756&r2=1098757&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/HomeController.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/HomeController.java
Mon May  2 19:24:15 2011
@@ -47,7 +47,7 @@ public class HomeController {
         this.userService = userService;
     }
 
-    @RequestMapping(value = "/")
+    @RequestMapping(value = {"/", "/index.html"})
     public String getHome(Model model) {
         User user = userService.getAuthenticatedUser();
         List<Page> pages = pageService.getAllPages(user.getUserId());

Added: incubator/rave/trunk/rave-portal/src/main/resources/portal.properties
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/resources/portal.properties?rev=1098757&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/resources/portal.properties (added)
+++ incubator/rave/trunk/rave-portal/src/main/resources/portal.properties Mon May  2 19:24:15
2011
@@ -0,0 +1,3 @@
+portal.opensocial_engine.protocol=http
+portal.opensocial_engine.root=localhost:8080
+portal.opensocial_engine.gadget_path=/gadgets
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp?rev=1098757&r1=1098756&r2=1098757&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp Mon May  2 19:24:15
2011
@@ -17,10 +17,16 @@
   under the License.
   
   $Id$
---%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
-<jsp:useBean id="pages" type="java.util.List<org.apache.rave.portal.model.Page>"
scope="request"/>
+
+--%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>           
                      <%--
+--%><%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>    
                      <%--
+--%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>          
                      <%--
+--%><jsp:useBean id="pages" type="java.util.List<org.apache.rave.portal.model.Page>"
scope="request"/><%--
+--%><fmt:setBundle basename="portal" var="portal" />                           
                      <%--
+--%><fmt:message bundle="${portal}" key="portal.opensocial_engine.protocol" var="osProtocol"/>
       <%--
+--%><fmt:message bundle="${portal}" key="portal.opensocial_engine.root"     var="osRoot"/>
           <%--
+--%><fmt:message bundle="${portal}" key="portal.opensocial_engine.gadget_path" var="osGadget"/>
         <%--
+--%><c:set var="opensocial_engine_url" value="${osProtocol}://${osRoot}${osGadget}"
/>
 <html>
 <head>
   <title>Rave Home</title>
@@ -38,16 +44,19 @@
       <td>
         <c:forEach var="regionWidget" items="${region.regionWidgets}">
           <c:set var="widget" value="${regionWidget.widget}"/>
-          ${widget.title}
-          <br>
-          <iframe src="/gadgets/ifr?url=${widget.url}&view=home" width="250" height="250"
frameborder="0"></iframe>
-          <br><br>
+          <div id="gadget_${widget.id}_chrome">
+            ${widget.title}
+          </div>
+          <div id="gadget_${widget.id}_body">
+            <iframe src="${opensocial_engine_url}/ifr?url=${widget.url}&view=home"
width="250" height="250" frameborder="0"></iframe>
+          </div>
         </c:forEach>
       </td>
     </c:forEach>
   </tr>
 </table>
 
-
+<script src="${opensocial_engine_url}/js/rpc:pubsub.js?c=1" type="text/javascript"></script>
+<script src="${pageContext.request.contextPath}/script/rave_opensocial.js" type="text/javascript"></script>
 </body>
 </html>
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml?rev=1098757&r1=1098756&r2=1098757&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/web.xml Mon May  2 19:24:15 2011
@@ -57,7 +57,13 @@
 
     <servlet-mapping>
         <servlet-name>dispatcher</servlet-name>
-        <url-pattern>/</url-pattern>
+        <url-pattern>/app/*</url-pattern>
+        <url-pattern>/index.html</url-pattern>
     </servlet-mapping>
 
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+
+
 </web-app>

Added: incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js?rev=1098757&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js (added)
+++ incubator/rave/trunk/rave-portal/src/main/webapp/script/rave_opensocial.js Mon May  2
19:24:15 2011
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+var rave = rave || {};
+rave.opensocial = rave.opensocial || {
+
+};
\ No newline at end of file



Mime
View raw message