rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfrank...@apache.org
Subject svn commit: r1127941 - in /incubator/rave/trunk/rave-portal/src: main/java/org/apache/rave/portal/web/controller/ main/java/org/apache/rave/portal/web/util/ main/resources/ main/webapp/WEB-INF/views/ test/java/org/apache/rave/portal/web/controller/
Date Thu, 26 May 2011 14:28:57 GMT
Author: mfranklin
Date: Thu May 26 14:28:56 2011
New Revision: 1127941

URL: http://svn.apache.org/viewvc?rev=1127941&view=rev
Log:
Added social gadget to widget store

Modified:
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java
    incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/util/ModelKeys.java
    incubator/rave/trunk/rave-portal/src/main/resources/initial_data.sql
    incubator/rave/trunk/rave-portal/src/main/webapp/WEB-INF/views/home.jsp
    incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/web/controller/WidgetStoreControllerTest.java

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java?rev=1127941&r1=1127940&r2=1127941&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/controller/WidgetStoreController.java
Thu May 26 14:28:56 2011
@@ -44,14 +44,14 @@ public class WidgetStoreController {
     @RequestMapping(method = RequestMethod.GET)
     public String view(Model model, @RequestParam long referringPageId) {
         model.addAttribute(ModelKeys.WIDGETS, widgetService.getAllWidgets());
-        model.addAttribute(ModelKeys.REFERER, referringPageId);
+        model.addAttribute(ModelKeys.REFERRING_PAGE_ID, referringPageId);
         return ViewNames.STORE;
     }
 
     @RequestMapping(method = RequestMethod.GET, value = "widget/{widgetId}")
     public String viewWidget(Model model, @PathVariable long widgetId, @RequestParam long
referringPageId) {
         model.addAttribute(ModelKeys.WIDGET, widgetService.getWidget(widgetId));
-        model.addAttribute(ModelKeys.REFERER, referringPageId);
+        model.addAttribute(ModelKeys.REFERRING_PAGE_ID, referringPageId);
         return ViewNames.WIDGET;
     }
 }

Modified: incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/util/ModelKeys.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/util/ModelKeys.java?rev=1127941&r1=1127940&r2=1127941&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/util/ModelKeys.java
(original)
+++ incubator/rave/trunk/rave-portal/src/main/java/org/apache/rave/portal/web/util/ModelKeys.java
Thu May 26 14:28:56 2011
@@ -24,5 +24,5 @@ public class ModelKeys {
     public final static String ERROR_MESSAGE = "errorMessage"; // an error message to be
reported to the user
     public static final String WIDGETS = "widgets"; // a list of widget objects
     public static final String WIDGET = "widget";
-    public static final String REFERER = "referrer";
+    public static final String REFERRING_PAGE_ID = "referringPageId";
 }
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal/src/main/resources/initial_data.sql
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/main/resources/initial_data.sql?rev=1127941&r1=1127940&r2=1127941&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/main/resources/initial_data.sql (original)
+++ incubator/rave/trunk/rave-portal/src/main/resources/initial_data.sql Thu May 26 14:28:56
2011
@@ -60,6 +60,10 @@ values(set(@tabnews_widget_id, next valu
 -- hamster widget
 insert into widget (id, title, url, type)
 values(set(@hamster_widget_id, next value for widget_id_seq), 'Pet Hamster', 'http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/hamster.xml',
'OpenSocial');
+
+-- slideshare widget
+insert into widget (id, title, url, type)
+values(set(@gifts_widget_id, next value for widget_id_seq), 'Gifts', 'http://opensocial-resources.googlecode.com/svn/samples/tutorial/tags/api-0.8/gifts_1_friends.xml',
'OpenSocial');
 -- end widget data ----
 
 --- start page layout data ---
@@ -158,4 +162,4 @@ INSERT INTO region_widget(id, widget_id,
 values (next value for region_widget_id_seq, @hamster_widget_id, @page_1_region_2, 0, 'N');
 INSERT INTO region_widget(id, widget_id, region_id, render_order, collapsed)
 values (next value for region_widget_id_seq, @tabnews_widget_id, @page_1_region_2, 1, 'N');
---- End canonical user_id_6 layout ---
\ No newline at end of file
+--- End canonical user_id_6 layout ---

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=1127941&r1=1127940&r2=1127941&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 Thu May 26 14:28:56
2011
@@ -35,7 +35,7 @@
 <c:set var="defaultPage" value="${pages[0]}"/>
 <div id="header">
     <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">Logout</a>
-    <a href="<spring:url value="/app/store?referrerId=${defaultPage.id}" />">Widget
Store</a>
+    <a href="<spring:url value="/app/store?referringPageId=${defaultPage.id}" />">Widget
Store</a>
 </div>
 <h1>Hello ${defaultPage.owner.username}, welcome to Rave!</h1>
 <script type="text/javascript">

Modified: incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/web/controller/WidgetStoreControllerTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/web/controller/WidgetStoreControllerTest.java?rev=1127941&r1=1127940&r2=1127941&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/web/controller/WidgetStoreControllerTest.java
(original)
+++ incubator/rave/trunk/rave-portal/src/test/java/org/apache/rave/portal/web/controller/WidgetStoreControllerTest.java
Thu May 26 14:28:56 2011
@@ -62,7 +62,7 @@ public class WidgetStoreControllerTest {
         verify(widgetService);
         assertThat(view, is(equalTo(ViewNames.STORE)));
         assertThat(model.containsAttribute(ModelKeys.WIDGETS), is(true));
-        assertThat((Long)model.asMap().get(ModelKeys.REFERER), is(equalTo(REFERRER_ID)));
+        assertThat((Long)model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));
         assertThat(widgets, is(sameInstance(widgets)));
     }
 



Mime
View raw message