Changeset 4242
- Timestamp:
- 01/09/14 16:21:10 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java
r4240 r4242 1 1 package eu.clarin.cmdi.vlo.pages; 2 2 3 import eu.clarin.cmdi.vlo.Theme; 3 4 import eu.clarin.cmdi.vlo.VloWebApplication; 4 5 import eu.clarin.cmdi.vlo.VloSession; … … 15 16 /** 16 17 * Properties common to all VLO web application's page objects 17 * 18 * 18 19 * @author keeloo 19 20 */ 20 public class BasePage extends WebPage implements IHeaderContributor {21 21 public class BasePage extends WebPage implements IHeaderContributor { 22 22 23 // reference to the web application object 23 24 static VloWebApplication webApp; … … 31 32 webApp = vloWebApplication; 32 33 } 33 34 34 35 /** 35 36 * Install a VLO theme<br><br> 36 * 37 * 37 38 * A VLO theme is determined by a page title, a CSS file, and a banner split 38 39 * in a left and right image. 39 * 40 * 40 41 * The left part of the banner serves as a link to the faceted search page, 41 42 * the application's start page. In the field below banner there is a link 42 43 * to the page the web application is launched from; the applications home 43 44 * page. This link page is defined in the VloConfig file. 44 * 45 * @param parameters 45 * 46 * @param parameters 46 47 */ 47 48 public BasePage(PageParameters parameters) { 48 49 49 super(parameters); 50 final Theme currentTheme = VloSession.get().getCurrentTheme(); 50 51 51 52 // set the page title 52 53 53 Label pageTitle; 54 pageTitle = new Label ("pagetitle", VloSession.get().getCurrentTheme().pageTitle);55 add 56 54 pageTitle = new Label("pagetitle", currentTheme.pageTitle); 55 add(pageTitle); 56 57 57 // set the applications start page link to the faceted search page 58 PageParameters startPageParameters = new PageParameters 58 PageParameters startPageParameters = new PageParameters(); 59 59 // add the session persistent parameters 60 60 startPageParameters.mergeWith(VloSession.get().getVloSessionPageParameters()); … … 63 63 FacetedSearchPage.class, startPageParameters); 64 64 add(link); 65 65 66 66 // refer to the the left part of the vlo banner as a resource 67 67 ContextRelativeResource leftImageRes; 68 leftImageRes = new ContextRelativeResource( VloSession.get().getCurrentTheme().topLeftImage);68 leftImageRes = new ContextRelativeResource(currentTheme.topLeftImage); 69 69 70 70 // create the image 71 71 Image leftImage; 72 72 leftImage = new Image("leftimage", leftImageRes); 73 73 74 74 // add the image to the page 75 75 link.add(leftImage); … … 77 77 // refer to the right part of the vlo banner as a resource 78 78 ContextRelativeResource rightImageRes; 79 rightImageRes = new ContextRelativeResource( VloSession.get().getCurrentTheme().topRightImage);80 79 rightImageRes = new ContextRelativeResource(currentTheme.topRightImage); 80 81 81 // create the image 82 82 Image rightImage; 83 83 rightImage = new Image("rightimage", rightImageRes); 84 84 85 85 // add it to the page 86 add 87 86 add(rightImage); 87 88 88 // set the partnerlinks 89 90 89 Label partnerLinkMap; 91 partnerLinkMap = new Label ("partnerlinkmap", VloSession.get().getCurrentTheme().partnerLinkMap);90 partnerLinkMap = new Label("partnerlinkmap", currentTheme.partnerLinkMap); 92 91 partnerLinkMap.setEscapeModelStrings(false); 93 add 92 add(partnerLinkMap); 94 93 } 95 94 … … 103 102 public void renderHead(IHeaderResponse response) { 104 103 response.render(CssHeaderItem.forUrl(VloSession.get().getCurrentTheme().cssFile)); 105 } 104 } 106 105 }
Note: See TracChangeset
for help on using the changeset viewer.