Ignore:
Timestamp:
03/31/14 15:12:25 (11 years ago)
Author:
Twan Goosen
Message:

wrote tests for DocumentFieldsProvider?

Location:
vlo/branches/vlo-3.0/vlo-web-app/src
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/provider/DocumentFieldsProvider.java

    r4632 r4854  
    2323import java.util.Collection;
    2424import java.util.Iterator;
     25import java.util.List;
    2526import org.apache.solr.common.SolrDocument;
    2627import org.apache.wicket.markup.repeater.data.IDataProvider;
     
    3738    private final IModel<SolrDocument> documentModel;
    3839    private final FieldFilter fieldFilter;
    39     private Collection<DocumentFieldModel> fields;
     40    private List<DocumentFieldModel> fields;
    4041
    4142    /**
     
    4950    }
    5051
    51     private Collection<DocumentFieldModel> getFields() {
     52    private List<DocumentFieldModel> getFields() {
    5253        if (fields == null) {
    5354            // lazy loading/caching of included field models
     
    6364    }
    6465
     66    /**
     67     *
     68     * @param first index of the first item in the list returned by the iterator
     69     * @param count is ignored
     70     * @return
     71     */
    6572    @Override
    6673    public Iterator<? extends DocumentField> iterator(long first, long count) {
    67         return getFields().iterator();
     74        return getFields().listIterator((int) first);
    6875    }
    6976
Note: See TracChangeset for help on using the changeset viewer.