Project

General

Profile

Revision 9f9727cb

ID9f9727cbb630e20c9b9f3af1a245cb1761ffa8c2
Parent 6f9eb1fe
Child 4b501287

Added by Andreas Kohlbecker over 2 years ago

ref #6169 lazy loading of RegistrationItem in the ListView

View differences:

pom.xml
27 27
    <!-- the cdm internal repository -->
28 28
    <repository>
29 29
      <id>EditRepository</id>
30
      <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
30
      <url>http://cybertaxonomy.eu/mavenrepo/</url>
31 31
    </repository>
32 32
    <!-- current spring source repositories -->
33 33
    <repository>
......
450 450
      <artifactId>contextmenu</artifactId>
451 451
      <version>4.5</version>
452 452
    </dependency>
453
    <dependency>
454
       <!--  only in the edit repo -->
455
      <groupId>org.vaadin.addons</groupId>
456
      <artifactId>lazyloadwrapper</artifactId>
457
      <version>0.1-alpha</version>
458
    </dependency>
453 459
    <!-- ============ cdmlib ============ -->
454 460
    <dependency>
455 461
      <groupId>eu.etaxonomy</groupId>
src/main/java/eu/etaxonomy/cdm/mock/RegistrationService.java
40 40
    /**
41 41
     *
42 42
     */
43
    private static final int SIZE = 5; // FIXME test performance with 50 !!!!!
43
    private static final int SIZE = 50; // FIXME test performance with 50 !!!!!
44 44

  
45 45
    @Autowired
46 46
    @Qualifier("cdmRepository")
src/main/java/eu/etaxonomy/cdm/vaadin/AppWidgetSet.gwt.xml
34 34
    
35 35

  
36 36
    <inherits name="eu.etaxonomy.vaadin.ui.DevDayWidgetset" />
37

  
38
    <inherits name="com.vaadin.lazyloadwrapper.widgetset.LazyLoadWrapperWidgetset" />
37 39
</module>
src/main/java/eu/etaxonomy/cdm/vaadin/view/phycobank/ListViewBean.java
16 16
import com.vaadin.data.util.BeanContainer;
17 17
import com.vaadin.data.util.GeneratedPropertyContainer;
18 18
import com.vaadin.data.util.PropertyValueGenerator;
19
import com.vaadin.lazyloadwrapper.LazyLoadWrapper;
19 20
import com.vaadin.navigator.View;
20 21
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
21 22
import com.vaadin.shared.ui.MarginInfo;
22 23
import com.vaadin.shared.ui.grid.HeightMode;
23 24
import com.vaadin.spring.annotation.SpringView;
24 25
import com.vaadin.ui.Alignment;
26
import com.vaadin.ui.Component;
25 27
import com.vaadin.ui.Grid;
26 28
import com.vaadin.ui.Grid.Column;
27 29
import com.vaadin.ui.Grid.SelectionMode;
......
193 195
        list.setSpacing(true);
194 196
        for(RegistrationDTO regDto : registrations) {
195 197

  
196
            list.addComponent(new RegistrationItem(regDto, this));
197
            if(list.getComponentCount() > 10){
198
                break;
199
            }
198
            Component lazyItem = new LazyLoadWrapper(new RegistrationItem(regDto, this));
199
            list.addComponent(lazyItem);
200
//            if(list.getComponentCount() > 10){
201
//                break;
202
//            }
200 203
        }
201 204
        panel.setContent(list);
202 205

  
src/main/java/eu/etaxonomy/vaadin/ui/DevDayWidgetset.gwt.xml
8 8
    <inherits name="org.vaadin.peter.contextmenu.ContextmenuWidgetset" />
9 9

  
10 10
    <inherits name="com.vaadin.DefaultWidgetSet" />
11

  
12
    <inherits name="com.vaadin.lazyloadwrapper.widgetset.LazyLoadWrapperWidgetset" />
11 13
</module>

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)