Author: solomax
Date: Wed May  8 12:52:16 2013
New Revision: 1480257

URL: http://svn.apache.org/r1480257
Log:
[OPENMEETINGS-612] basic RSS widget is added (incomplete)

Added:
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidget.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetDescriptor.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.html
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.java
Modified:
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/installation/ImportInitvalues.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
    
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/installation/ImportInitvalues.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/installation/ImportInitvalues.java?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/installation/ImportInitvalues.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/installation/ImportInitvalues.java
 Wed May  8 12:52:16 2013
@@ -19,6 +19,8 @@
 package org.apache.openmeetings.installation;
 
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.CRYPT_KEY;
+import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DASHBOARD_SHOW_MYROOMS_KEY;
+import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DASHBOARD_SHOW_RSS_KEY;
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DEFAUT_LANG_KEY;
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.FRONTEND_REGISTER_KEY;
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.MAX_UPLOAD_SIZE_KEY;
@@ -414,14 +416,11 @@ public class ImportInitvalues {
                configurationDao.add("default.dashboard.tab", "0", null,
                                "Default selection in Dashboard tabs as 
tab-index-id");
 
-               configurationDao.add("dashboard.show.myrooms", "1", null,
-                               "Show My Rooms Tab");
+               configurationDao.add(DASHBOARD_SHOW_MYROOMS_KEY, "1", null, 
"Show My Rooms Tab");
 
-               configurationDao.add("dashboard.show.chat", "1", null,
-                               "Show Chat Tab");
+               configurationDao.add("dashboard.show.chat", "1", null, "Show 
Chat Tab");
 
-               configurationDao.add("dashboard.show.rssfeed", "0", null,
-                               "Show RSS Tab");
+               configurationDao.add(DASHBOARD_SHOW_RSS_KEY, "0", null, "Show 
RSS Tab");
 
                configurationDao
                                .add(

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Configuration.java
 Wed May  8 12:52:16 2013
@@ -60,6 +60,10 @@ public class Configuration implements Se
        public static final String CRYPT_KEY = "crypt_ClassName";
        public static final String DEFAUT_LANG_KEY = "default_lang_id";
        public static final String MAX_UPLOAD_SIZE_KEY = "max_upload_size";
+       public static final String DASHBOARD_SHOW_MYROOMS_KEY = 
"dashboard.show.myrooms";
+       public static final String DASHBOARD_SHOW_RSS_KEY = 
"dashboard.show.rssfeed";
+       public static final String RSS_FEED1_KEY = "rss_feed1";
+       public static final String RSS_FEED2_KEY = "rss_feed2";
        public static final String FRONTEND_REGISTER_KEY = 
"allow_frontend_register";
 
        @Id

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/remote/MainService.java
 Wed May  8 12:52:16 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.openmeetings.remote;
 
+import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DASHBOARD_SHOW_MYROOMS_KEY;
+import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DASHBOARD_SHOW_RSS_KEY;
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.FRONTEND_REGISTER_KEY;
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.MAX_UPLOAD_SIZE_KEY;
 
@@ -986,8 +988,8 @@ public class MainService implements IPen
                        if (authLevelUtil.checkUserLevel(user_level)) {
                                return configurationDao.get(
                                                "dashboard.show.chat", //
-                                               "dashboard.show.myrooms", //
-                                               "dashboard.show.rssfeed", //
+                                               DASHBOARD_SHOW_MYROOMS_KEY, //
+                                               DASHBOARD_SHOW_RSS_KEY, //
                                                "default.dashboard.tab", //
                                                "default.landing.zone");
                        }

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/Application.java
 Wed May  8 12:52:16 2013
@@ -20,6 +20,7 @@ package org.apache.openmeetings.web.app;
 
 import org.apache.openmeetings.remote.red5.ScopeApplicationAdapter;
 import 
org.apache.openmeetings.web.components.user.dashboard.PrivateRoomsWidgetDescriptor;
+import 
org.apache.openmeetings.web.components.user.dashboard.RssWidgetDescriptor;
 import 
org.apache.openmeetings.web.components.user.dashboard.StartWidgetDescriptor;
 import 
org.apache.openmeetings.web.components.user.dashboard.WelcomeWidgetDescriptor;
 import org.apache.openmeetings.web.pages.MainPage;
@@ -80,6 +81,7 @@ public class Application extends Authent
                widgetRegistry.registerWidget(new 
PrivateRoomsWidgetDescriptor());
                widgetRegistry.registerWidget(new WelcomeWidgetDescriptor());
                widgetRegistry.registerWidget(new StartWidgetDescriptor());
+               widgetRegistry.registerWidget(new RssWidgetDescriptor());
                // add dashboard context injector
                DashboardContextInjector dashboardContextInjector = new 
DashboardContextInjector(dashboardContext);
                
getComponentInstantiationListeners().add(dashboardContextInjector);

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/app/WebSession.java
 Wed May  8 12:52:16 2013
@@ -18,6 +18,8 @@
  */
 package org.apache.openmeetings.web.app;
 
+import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DASHBOARD_SHOW_MYROOMS_KEY;
+import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DASHBOARD_SHOW_RSS_KEY;
 import static 
org.apache.openmeetings.persistence.beans.basic.Configuration.DEFAUT_LANG_KEY;
 import static org.apache.openmeetings.web.app.Application.getBean;
 import static org.apache.openmeetings.web.app.Application.getDashboardContext;
@@ -38,6 +40,7 @@ import org.apache.openmeetings.persisten
 import org.apache.openmeetings.persistence.beans.lang.FieldLanguage;
 import org.apache.openmeetings.persistence.beans.user.User;
 import 
org.apache.openmeetings.web.components.user.dashboard.PrivateRoomsWidgetDescriptor;
+import 
org.apache.openmeetings.web.components.user.dashboard.RssWidgetDescriptor;
 import 
org.apache.openmeetings.web.components.user.dashboard.StartWidgetDescriptor;
 import 
org.apache.openmeetings.web.components.user.dashboard.WelcomeWidgetDescriptor;
 import 
org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession;
@@ -179,8 +182,14 @@ public class WebSession extends Abstract
                        
                        WidgetFactory widgetFactory = 
dashboardContext.getWidgetFactory();
                        dashboard.addWidget(widgetFactory.createWidget(new 
WelcomeWidgetDescriptor()));
-                       dashboard.addWidget(widgetFactory.createWidget(new 
StartWidgetDescriptor())); 
-                       dashboard.addWidget(widgetFactory.createWidget(new 
PrivateRoomsWidgetDescriptor()));
+                       dashboard.addWidget(widgetFactory.createWidget(new 
StartWidgetDescriptor()));
+                       ConfigurationDao cfgDao = 
getBean(ConfigurationDao.class);
+                       if 
("1".equals(cfgDao.getConfValue(DASHBOARD_SHOW_MYROOMS_KEY, Integer.class, 
"0"))) {
+                               
dashboard.addWidget(widgetFactory.createWidget(new 
PrivateRoomsWidgetDescriptor()));
+                       }
+                       if 
("1".equals(cfgDao.getConfValue(DASHBOARD_SHOW_RSS_KEY, Integer.class, "0"))) {
+                               
dashboard.addWidget(widgetFactory.createWidget(new RssWidgetDescriptor()));
+                       }
                        dashboardContext.getDashboardPersiter().save(dashboard);
                }
        }

Added: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidget.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidget.java?rev=1480257&view=auto
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidget.java
 (added)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidget.java
 Wed May  8 12:52:16 2013
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package org.apache.openmeetings.web.components.user.dashboard;
+
+import org.apache.openmeetings.web.app.WebSession;
+import org.apache.wicket.model.Model;
+
+import ro.fortsoft.wicket.dashboard.AbstractWidget;
+import ro.fortsoft.wicket.dashboard.Widget;
+import ro.fortsoft.wicket.dashboard.WidgetLocation;
+import ro.fortsoft.wicket.dashboard.web.WidgetView;
+
+public class RssWidget extends AbstractWidget {
+       private static final long serialVersionUID = 8866852061674736808L;
+
+       public RssWidget() {
+               super();
+               title = WebSession.getString(277L);
+               location = new WidgetLocation(1, 1);
+       }
+       
+       public WidgetView createView(String viewId) {
+               return new RssWidgetView(viewId, new Model<Widget>(this));
+       }
+}

Added: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetDescriptor.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetDescriptor.java?rev=1480257&view=auto
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetDescriptor.java
 (added)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetDescriptor.java
 Wed May  8 12:52:16 2013
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.openmeetings.web.components.user.dashboard;
+
+import org.apache.openmeetings.web.app.WebSession;
+
+import ro.fortsoft.wicket.dashboard.WidgetDescriptor;
+
+public class RssWidgetDescriptor implements WidgetDescriptor {
+       private static final long serialVersionUID = -9113376703084624276L;
+
+       public String getName() {
+               return WebSession.getString(277L);
+       }
+
+       public String getProvider() {
+               return "Apache Openmeetings";
+       }
+
+       public String getDescription() {
+               return WebSession.getString(277L);
+       }
+
+       public String getWidgetClassName() {
+               return RssWidget.class.getName();
+       }
+
+       public String getTypeName() {
+               return "om.widget.rss";
+       }
+}

Added: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.html
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.html?rev=1480257&view=auto
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.html
 (added)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.html
 Wed May  8 12:52:16 2013
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  
+-->
+<html xmlns:wicket="http://wicket.apache.org";>
+<wicket:head>
+       <script type="text/javascript">
+               function getItems(url) {
+                       $.ajax({
+                               url: url
+                               , type: 'GET'
+                           , crossDomain: true
+                               , dataType: 'xml'
+                               , success: function(data, status, xhr) {
+                                       var $xml = $(data);
+                                       $xml.find("item").each(function() {
+                                               var $this = $(this), item = {
+                                                       title : 
$this.find("title").text(),
+                                                       link : 
$this.find("link").text(),
+                                                       description : 
$this.find("description").text(),
+                                                       pubDate : 
$this.find("pubDate").text(),
+                                                       author : 
$this.find("author").text()
+                                               }
+                                               addItem(item);
+                                       });
+                                       $xml.find("entry").each(function() {
+                                               var $this = $(this), item = {
+                                                       title : 
$this.find("title").text(),
+                                                       link : 
$this.find("link").text(),
+                                                       description : 
$this.find("summary").text(),
+                                                       pubDate : 
$this.find("published").text(),
+                                                       author : 
$this.find("author").text()
+                                               }
+                                               addItem(item);
+                                       });
+                               }
+                       });
+               }
+               
+               function addItem(item) {
+                       $('#feeds').append('<div class="item"><div 
class="title">' + item.title + '</div><div class="desc">' + item.description
+                                       + '</div></div>');
+               }
+       </script>
+</wicket:head>
+<wicket:panel>
+       <div id="feeds"></div>
+</wicket:panel>
+</html>

Added: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.java?rev=1480257&view=auto
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.java
 (added)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/RssWidgetView.java
 Wed May  8 12:52:16 2013
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.openmeetings.web.components.user.dashboard;
+
+import static org.apache.openmeetings.web.app.Application.getBean;
+
+import org.apache.openmeetings.data.basic.dao.ConfigurationDao;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.model.Model;
+
+import ro.fortsoft.wicket.dashboard.Widget;
+import ro.fortsoft.wicket.dashboard.web.WidgetView;
+
+public class RssWidgetView extends WidgetView {
+       private static final long serialVersionUID = -6257866996099503210L;
+
+       public RssWidgetView(String id, Model<Widget> model) {
+               super(id, model);
+       }
+       
+       @Override
+       public void renderHead(IHeaderResponse response) {
+               super.renderHead(response);
+               ConfigurationDao cfgDao = getBean(ConfigurationDao.class);
+               //FIXME refactor this link to XML resoursce should be generated 
here
+               /*
+               response.render(OnDomReadyHeaderItem.forScript("getNews('"
+                               + cfgDao.getConfValue(RSS_FEED1_KEY, 
String.class, "") + ","
+                               + cfgDao.getConfValue(RSS_FEED2_KEY, 
String.class, "") + "');"
+                               )) ;
+                               */
+       }
+}

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.html
 Wed May  8 12:52:16 2013
@@ -19,25 +19,25 @@
   
 -->
 <html xmlns:wicket="http://wicket.apache.org";>
-       <wicket:panel>
-       <table>
-               <tr>
-                       <td><div wicket:id="img"></div></td>
-                       <td>
-                               <h3><wicket:ommessage key="376"/>&nbsp;<span 
wicket:id="firstname"></span>&nbsp;<span wicket:id="lastname"></span></h3>
-                               <wicket:ommessage key="1143"/>&nbsp;<span 
wicket:id="tz"></span><br/>
-                               <wicket:ommessage key="378"/>&nbsp;<a 
wicket:id="openUnread"><span wicket:id="unread"></span></a><br/>
-                               <a wicket:id="editProfile"><wicket:ommessage 
key="377"/></a>
-                       </td>
-               </tr>
-               <tr>
-                       <td colspan="2">
-                               <h3><wicket:ommessage key="281"/></h3>
-                               <a 
wicket:ommessage="href:282"><wicket:ommessage key="286"/></a><br/>
-                               <a 
wicket:ommessage="href:283"><wicket:ommessage key="287"/></a><br/>
-                               <wicket:ommessage key="1527"/><br/>
-                               </td>
-               </tr>
-       </table>
-       </wicket:panel>
-</html>
\ No newline at end of file
+<wicket:panel>
+       <table>
+               <tr>
+                       <td><div wicket:id="img"></div></td>
+                       <td>
+                               <h3><wicket:ommessage key="376"/>&nbsp;<span 
wicket:id="firstname"></span>&nbsp;<span wicket:id="lastname"></span></h3>
+                               <wicket:ommessage key="1143"/>&nbsp;<span 
wicket:id="tz"></span><br/>
+                               <wicket:ommessage key="378"/>&nbsp;<a 
wicket:id="openUnread"><span wicket:id="unread"></span></a><br/>
+                               <a wicket:id="editProfile"><wicket:ommessage 
key="377"/></a>
+                       </td>
+               </tr>
+               <tr>
+                       <td colspan="2">
+                               <h3><wicket:ommessage key="281"/></h3>
+                               <a 
wicket:ommessage="href:282"><wicket:ommessage key="286"/></a><br/>
+                               <a 
wicket:ommessage="href:283"><wicket:ommessage key="287"/></a><br/>
+                               <wicket:ommessage key="1527"/><br/>
+                       </td>
+               </tr>
+       </table>
+</wicket:panel>
+</html>

Modified: 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java?rev=1480257&r1=1480256&r2=1480257&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/web/components/user/dashboard/WelcomeWidgetView.java
 Wed May  8 12:52:16 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.openmeetings.web.components.user.dashboard;
 
+import static org.apache.openmeetings.web.app.Application.getBean;
 import static org.apache.openmeetings.web.app.WebSession.getUserId;
 import static 
org.apache.openmeetings.web.components.user.profile.SettingsPanel.EDIT_PROFILE_TAB_ID;
 import static 
org.apache.openmeetings.web.components.user.profile.SettingsPanel.MESSAGES_TAB_ID;
@@ -25,7 +26,6 @@ import static org.apache.openmeetings.we
 import org.apache.openmeetings.data.user.dao.PrivateMessagesDao;
 import org.apache.openmeetings.data.user.dao.UsersDao;
 import org.apache.openmeetings.persistence.beans.user.User;
-import org.apache.openmeetings.web.app.Application;
 import org.apache.openmeetings.web.components.UploadableProfileImagePanel;
 import org.apache.openmeetings.web.components.user.profile.SettingsPanel;
 import org.apache.openmeetings.web.pages.MainPage;
@@ -43,7 +43,7 @@ public class WelcomeWidgetView extends W
        public WelcomeWidgetView(String id, Model<Widget> model) {
                super(id, model);
 
-               User u = Application.getBean(UsersDao.class).get(getUserId());
+               User u = getBean(UsersDao.class).get(getUserId());
                add(new UploadableProfileImagePanel("img", getUserId()));
                 //FIXME this need to be aligned according to Locale
                add(new Label("firstname", Model.of(u.getFirstname())));
@@ -56,7 +56,7 @@ public class WelcomeWidgetView extends W
                        public void onClick(AjaxRequestTarget target) {
                                
target.add(((MainPage)getPage()).getContents().replace(new 
SettingsPanel("child", MESSAGES_TAB_ID)));
                        }
-               }.add(new Label("unread", Model.of("" + 
Application.getBean(PrivateMessagesDao.class)
+               }.add(new Label("unread", Model.of("" + 
getBean(PrivateMessagesDao.class)
                                .getNumberMessages(getUserId(), 0L, false)))));
                add(new AjaxLink<Void>("editProfile") {
                        private static final long serialVersionUID = 
-1847619557485964386L;


Reply via email to