| | |
| | |
|
| | | @Override
|
| | | protected void setupPage(String repositoryName, String pageName) {
|
| | | |
| | | //This method should only be called once in the page lifecycle.
|
| | | //However, it must be called after the constructor has run, hence not in onInitialize
|
| | | //It may be attempted to be called again if an info or error message is displayed.
|
| | | if (get("projectTitle") != null) { return; }
|
| | | |
| | | String projectName = StringUtils.getFirstPathElement(repositoryName);
|
| | | ProjectModel project = app().projects().getProjectModel(projectName);
|
| | |
|
| | | if (project.isUserProject()) {
|
| | | // user-as-project
|
| | | add(new LinkPanel("projectTitle", null, project.getDisplayName(),
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | protected void onInitialize() {
|
| | |
|
| | | super.onInitialize();
|
| | |
|
| | | // setup page header and footer
|
| | | setupPage(getRepositoryName(), "/ " + getPageName());
|
| | | }
|
| | | |
| | | @Override
|
| | | protected void onBeforeRender() {
|
| | | // dispose of repository object
|
| | |
| | | r.close();
|
| | | r = null;
|
| | | }
|
| | | |
| | | // setup page header and footer
|
| | | setupPage(getRepositoryName(), "/ " + getPageName());
|
| | |
|
| | | super.onBeforeRender();
|
| | | }
|