Changeset 4652 for vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/RecordPage.java
- Timestamp:
- 03/07/14 15:39:42 (10 years ago)
- 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 52 52 53 53 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 55 59 final QueryFacetsSelection selection = selectionParametersConverter.fromParameters(params); 56 60 this.contextModel = Model.of(selection); 57 addComponents(getModel()); 61 62 addComponents(documentModel); 58 63 } 59 64 … … 65 70 66 71 private void addComponents(IModel<SolrDocument> documentModel) { 67 if (documentModel.getObject() == null) {68 throw new RuntimeException("Document not found in model " + documentModel.toString());69 }70 72 add(new SolrFieldLabel("name", documentModel, FacetConstants.FIELD_NAME, "Unnamed record")); 71 73 add(createLandingPageLink("landingPageLink", documentModel));
Note: See TracChangeset
for help on using the changeset viewer.