latest changes for Vaadin Editor
authorAlexander Oppermann <a.oppermann@bgbm.org>
Mon, 27 Oct 2014 10:38:08 +0000 (10:38 +0000)
committerAlexander Oppermann <a.oppermann@bgbm.org>
Mon, 27 Oct 2014 10:38:08 +0000 (10:38 +0000)
* added in Web.XML production mode

.gitattributes
cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/vaadin/redlist/wigetset/AppWidgetSet.gwt.xml [new file with mode: 0644]
cdmlib-remote-webapp/src/main/webapp/WEB-INF/web.xml
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/vaadin/data/LazyLoadedContainer.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/vaadin/service/VaadinAuthenticationService.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/vaadin/uiset/redlist/views/DistributionSelectorView.java

index f12f94c1719615937373c7df88b8ab7efb7341a7..7548b49bbdaf03b5dc6a936a19649f9a73ad09bc 100644 (file)
@@ -1741,6 +1741,7 @@ cdmlib-remote-webapp/ide/eclipse/cdmlib-remote-webapp[!!-~]-[!!-~]run.launch -te
 cdmlib-remote-webapp/pom.xml -text
 cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/config/PreloadedBeans.java -text
 cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/config/SpringMVCConfig.java -text
+cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/vaadin/redlist/wigetset/AppWidgetSet.gwt.xml -text
 cdmlib-remote-webapp/src/main/resources/log4j.properties -text
 cdmlib-remote-webapp/src/main/webapp/VAADIN/themes/mytheme/favicon.ico -text
 cdmlib-remote-webapp/src/main/webapp/VAADIN/themes/mytheme/icons/32/Thumbs.db -text
diff --git a/cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/vaadin/redlist/wigetset/AppWidgetSet.gwt.xml b/cdmlib-remote-webapp/src/main/java/eu/etaxonomy/cdm/remote/vaadin/redlist/wigetset/AppWidgetSet.gwt.xml
new file mode 100644 (file)
index 0000000..04626bb
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
+<module>
+    <!--
+     Uncomment the following to compile the widgetset for one browser only.
+
+     Multiple browsers can be specified as a comma separated list. The
+     supported user agents at the moment of writing were:
+     ie8,ie9,gecko1_8,safari,opera
+
+     The value gecko1_8 is used for Firefox and safari is used for webkit
+     based browsers including Google Chrome.
+    -->
+    <!-- <set-property name="user.agent" value="safari"/> -->
+
+    <!--
+    To enable SuperDevMode, uncomment this line.
+
+    See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more
+    information and instructions.
+    -->
+    <!-- <set-configuration-property name="devModeRedirectEnabled" value="true" /> -->
+
+
+
+    <inherits name="com.vaadin.DefaultWidgetSet" />
+</module>
index 977205f2f8704a8616d35755a94f0f0b3585a29e..ded2c0ad9cdea2b9750d661b721e637b35c638d3 100644 (file)
         <param-value>eu.etaxonomy.cdm.remote.vaadin.widgetset.AppWidgetSet</param-value>
       </init-param>
     </servlet>
+    <!-- Set to production Mode to true if deployment for server is needed, otherwise set to false for debugging  -->
+    <context-param>
+         <param-name>productionMode</param-name>
+         <param-value>true</param-value>
+       </context-param>
     <servlet-mapping>
       <servlet-name>Vaadin Application Servlet</servlet-name>
       <url-pattern>/VAADIN/*</url-pattern>
@@ -69,6 +74,7 @@
       <url-pattern>/edit/*</url-pattern>
     </servlet-mapping>
 
+
     <filter>
       <filter-name>charsetFilter</filter-name>
       <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
index bd7ef99c4f3ac55810081f7ff4765a149e964ba3..48740ba71fd5b83423ecf1043100022e33e5bcd1 100644 (file)
@@ -23,9 +23,9 @@ public class LazyLoadedContainer extends BeanContainer implements Serializable{
        private static final long serialVersionUID = 1L;
 
        
-       ITaxonNodeService taxonNodeService;
-       IClassificationService classificationService;
-       IDescriptionService descriptionService;
+       transient ITaxonNodeService taxonNodeService;
+       transient IClassificationService classificationService;
+       transient IDescriptionService descriptionService;
        
        VaadinSession session;
        UUID uuid; 
index 68def115e0c3e124c7565fbc6dd5664a73e53d4c..cbc5ccf53c6cc13089aec5e245a5a57501a65d83 100644 (file)
@@ -3,6 +3,7 @@ package eu.etaxonomy.cdm.remote.vaadin.service;
 import javax.sql.DataSource;
 
 import org.apache.log4j.Logger;
+import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
@@ -68,12 +69,13 @@ public class VaadinAuthenticationService{
                try{
                        Authentication authentication = authenticationManager.authenticate(token);
                        conversationHolder = new ConversationHolder(dataSource, sessionFactory, transactionManager);
+                       Session session = conversationHolder.getSession();
                        conversationHolder.startTransaction();
                        SecurityContext context = SecurityContextHolder.getContext();
                        context.setAuthentication(authentication);
 //                     SecurityContextHolder.setStrategyName( SecurityContextHolder.MODE_GLOBAL );
                        setUserName(user);
-                       VaadinService.getCurrentRequest().getWrappedSession().setAttribute("context", context);
+//                     VaadinService.getCurrentRequest().getWrappedSession().setAttribute("context", context);
                        VaadinService.getCurrentRequest().getWrappedSession().setAttribute("isAuthenticated", true);
 //                     logger.info("VaadinSession: "+ VaadinSession.getCurrent().getSession().getAttribute("context"));
                        return true;
@@ -95,7 +97,7 @@ public class VaadinAuthenticationService{
                ui.close();
                conversationHolder.clear();
                conversationHolder.close();
-               conversationHolder.getSessionHolder().getSession().close();
+//             conversationHolder.getSessionHolder().getSession().close();
 //             VaadinSession.getCurrent().close();
                VaadinService.getCurrentRequest().getWrappedSession().invalidate(); 
                ui.getSession().close();
index 4ff9c4ab2384f68d9b329b835e1583122b127b44..a3542952f68073ba826302f1db910123bb593d79 100644 (file)
@@ -66,6 +66,6 @@ public class DistributionSelectorView extends CustomComponent implements View {
 
        @Override
        public void enter(ViewChangeEvent event) {
-               
+
        }
 }