Ignore:
Timestamp:
03/07/14 15:39:42 (10 years ago)
Author:
Twan Goosen
Message:

added processing of page parameter to record page (tests needed to be adapted)

File:
1 edited

Legend:

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

    r4649 r4652  
    5252
    5353    public RecordPage(PageParameters params) {
    54         super(new SolrDocumentModel(params.get("docId").toString()));
     54        super(params);
     55       
     56        final SolrDocumentModel documentModel = new SolrDocumentModel(params.get("docId").toString());
     57        setModel(documentModel);
     58       
    5559        final QueryFacetsSelection selection = selectionParametersConverter.fromParameters(params);
    5660        this.contextModel = Model.of(selection);
    57         addComponents(getModel());
     61       
     62        addComponents(documentModel);
    5863    }
    5964
     
    6570
    6671    private void addComponents(IModel<SolrDocument> documentModel) {
    67         if (documentModel.getObject() == null) {
    68             throw new RuntimeException("Document not found in model " + documentModel.toString());
    69         }
    7072        add(new SolrFieldLabel("name", documentModel, FacetConstants.FIELD_NAME, "Unnamed record"));
    7173        add(createLandingPageLink("landingPageLink", documentModel));
Note: See TracChangeset for help on using the changeset viewer.