dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19232
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8300: updated mobile (web) client to use its own servlet, having it piggyback on the api servlet caused...
------------------------------------------------------------
revno: 8300
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-09-28 16:09:02 +0700
message:
updated mobile (web) client to use its own servlet, having it piggyback on the api servlet caused too many issues.
removed:
dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/servlet.xml
added:
dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/mobile.xml
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/log4j.properties
dhis-2/dhis-web/dhis-web-mobile/src/main/java/org/hisp/dhis/web/mobile/controller/MobileController.java
dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/inbox.vm
dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml
dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/log4j.properties'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/log4j.properties 2012-05-23 13:18:19 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/WEB-INF/classes/log4j.properties 2012-09-28 09:09:02 +0000
@@ -21,3 +21,5 @@
# Ehcache logging level
log4j.logger.org.hibernate.cache=ERROR
+
+log4j.logger.org.springframework = WARN
=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/java/org/hisp/dhis/web/mobile/controller/MobileController.java'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/java/org/hisp/dhis/web/mobile/controller/MobileController.java 2012-09-27 12:46:32 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/java/org/hisp/dhis/web/mobile/controller/MobileController.java 2012-09-28 09:09:02 +0000
@@ -40,7 +40,13 @@
@RequestMapping( value = "/dhis-web-mobile" )
public String base()
{
- return "redirect:dhis-web-mobile/index";
+ return "redirect:/dhis-web-mobile/index";
+ }
+
+ @RequestMapping( value = "/" )
+ public String baseWithSlash()
+ {
+ return "redirect:/dhis-web-mobile/index";
}
@RequestMapping( value = "/index" )
=== added file 'dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/mobile.xml'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/mobile.xml 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/mobile.xml 2012-09-28 09:09:02 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
+
+ <context:component-scan base-package="org.hisp.dhis.web.mobile" />
+
+ <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
+ <property name="resourceLoaderPath" value="/WEB-INF/dhis-web-mobile-velocity/"/>
+ </bean>
+
+ <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
+ <property name="cache" value="true"/>
+ <property name="prefix" value=""/>
+ <property name="suffix" value=".vm"/>
+ <property name="order" value="0" />
+ </bean>
+
+</beans>
=== removed file 'dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/servlet.xml'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/servlet.xml 2012-09-12 07:38:01 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/resources/META-INF/dhis/servlet.xml 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
-
- <context:component-scan base-package="org.hisp.dhis.web.mobile" />
-
- <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
- <property name="resourceLoaderPath" value="/WEB-INF/dhis-web-mobile-velocity/"/>
- </bean>
-
- <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
- <property name="cache" value="true"/>
- <property name="prefix" value=""/>
- <property name="suffix" value=".vm"/>
- <property name="order" value="0" />
- </bean>
-
-</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/inbox.vm'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/inbox.vm 2012-09-27 12:46:32 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/inbox.vm 2012-09-28 09:09:02 +0000
@@ -1,3 +1,13 @@
+<script>
+ $(document).bind('pagebeforecreate',function(){
+ $.ajax({
+ url: '../api/currentUser/inbox.json',
+ async: false
+ }).success(function(data) {
+ }).error(function() {
+ });
+ });
+</script>
<section data-role="page" id="inboxPage" data-theme="c">
@@ -7,6 +17,17 @@
</header>
<section data-role="content">
+ <ul data-role="listview" data-inset="true">
+ <li data-role="list-divider">Messages</li>
+ <li><a href="index">Message #1</a></li>
+ <li><a href="index">Message #2</a></li>
+ <li><a href="index">Message #3</a></li>
+ <li><a href="index">Message #4</a></li>
+ <li data-role="list-divider">Interpretations</li>
+ <li><a href="index">Interpretation #1</a></li>
+ <li><a href="index">Interpretation #2</a></li>
+ <li><a href="index">Interpretation #3</a></li>
+ </ul>
</section>
<footer data-role="footer" data-theme="b">
=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml 2012-09-27 12:46:32 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml 2012-09-28 09:09:02 +0000
@@ -72,15 +72,25 @@
<load-on-startup>1</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>mobileServlet</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <init-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath*:/META-INF/dhis/mobile.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
<!-- Mobile -->
<servlet-mapping>
- <servlet-name>webapiServlet</servlet-name>
+ <servlet-name>mobileServlet</servlet-name>
<url-pattern>/dhis-web-mobile</url-pattern>
</servlet-mapping>
<servlet-mapping>
- <servlet-name>webapiServlet</servlet-name>
+ <servlet-name>mobileServlet</servlet-name>
<url-pattern>/dhis-web-mobile/*</url-pattern>
</servlet-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2012-09-12 05:58:51 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml 2012-09-28 09:09:02 +0000
@@ -76,15 +76,25 @@
<load-on-startup>1</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>mobileServlet</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <init-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath*:/META-INF/dhis/mobile.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
<!-- Mobile -->
<servlet-mapping>
- <servlet-name>webapiServlet</servlet-name>
+ <servlet-name>mobileServlet</servlet-name>
<url-pattern>/dhis-web-mobile</url-pattern>
</servlet-mapping>
<servlet-mapping>
- <servlet-name>webapiServlet</servlet-name>
+ <servlet-name>mobileServlet</servlet-name>
<url-pattern>/dhis-web-mobile/*</url-pattern>
</servlet-mapping>
@@ -94,6 +104,7 @@
<servlet-name>webapiServlet</servlet-name>
<url-pattern>/api</url-pattern>
</servlet-mapping>
+
<servlet-mapping>
<servlet-name>webapiServlet</servlet-name>
<url-pattern>/api/*</url-pattern>