Changeset 2775


Ignore:
Timestamp:
04/04/13 14:10:42 (11 years ago)
Author:
keeloo
Message:

Made some provisions displaying the landing page in the web application.

Location:
vlo/trunk/vlo_web_app
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo_web_app/pom.xml

    r2768 r2775  
    2727        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
    2828        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     29        <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
    2930    </properties>
    3031
  • vlo/trunk/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.properties

    r2768 r2775  
    1515quickNavTo=Quick navigation to
    1616resources=Resources
     17landingPages=Landing pages
    1718results=Results
    1819resultNotFound=Result could not be found
  • vlo/trunk/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.html

    r2768 r2775  
    2828                <table wicket:id="attributesTable" />
    2929            </div>
     30            <div class="resourceList"><span><wicket:message key="landingPages">[Landing pages]</wicket:message>:</span>
     31                <ul class="resourceItem" >
     32                    <li wicket:id="landingPageList"></li>
     33                </ul>
     34            </div>
    3035            <div class="resourceList"><span><wicket:message key="resources">[Resources]</wicket:message>:</span>
    3136                <ul class="resourceItem" >
     
    3338                </ul>
    3439            </div>
    35                                
    36                         <br>   
     40               
     41            <br>   
    3742            <div wicket:id="contentSearch"><span>Search in this resource:</span>
    38                 <br>
     43                <br>
    3944                <span wicket:id="contentSearchForm"></span>
    4045            </div>
  • vlo/trunk/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java

    r2768 r2775  
    6060import eu.clarin.cmdi.vlo.config.VloConfig;
    6161import eu.clarin.cmdi.vlo.dao.DaoLocator;
     62import java.util.Iterator;
    6263
    6364public class ShowResultPage extends BasePage {
     
    8687            }
    8788            addAttributesTable(solrDocument);
     89            addLandingPageLinks(solrDocument);
    8890            addResourceLinks(solrDocument);
    8991            addSearchServiceForm(solrDocument);
     
    195197
    196198        return columns;
     199    }
     200   
     201    @SuppressWarnings("serial")
     202    private void addLandingPageLinks(SolrDocument solrDocument){
     203       
     204        RepeatingView repeatingView = new RepeatingView("landingPageList");
     205        add(repeatingView);
     206       
     207        if (solrDocument.containsKey(FacetConstants.FIELD_LANDINGPAGE)) {
     208           
     209            Collection<Object> landingPages = solrDocument.getFieldValues(FacetConstants.FIELD_LANDINGPAGE);
     210            for (Iterator<Object> it = landingPages.iterator(); it.hasNext();) {
     211                final Object landingPage;
     212                landingPage = it.next();
     213
     214                repeatingView.add(new AjaxLazyLoadPanel(repeatingView.newChildId()) {
     215                    @Override
     216                    public Component getLazyLoadComponent(String markupId) {
     217                        String landingPageLink;
     218                        landingPageLink = landingPage.toString();
     219                        return new ResourceLinkPanel(markupId, "", landingPage.toString());
     220                    }
     221                });
     222            }
     223        }
    197224    }
    198225
Note: See TracChangeset for help on using the changeset viewer.