*/
private void installView(final JavaSymbolName viewName,
final String folderName, final String title, final String category,
final boolean registerStaticController, final LogicalPath webappPath) {
// Probe if common web artifacts exist, and install them if needed
final PathResolver pathResolver = projectOperations.getPathResolver();
if (!fileManager.exists(pathResolver.getIdentifier(webappPath,
"WEB-INF/layouts/default.jspx"))) {
installCommonViewArtefacts(webappPath.getModule());
}
final String lcViewName = viewName.getSymbolName().toLowerCase();
// Update the application-specific resource bundle (i.e. default
// translation)
final String messageCode = "label"
+ folderName.replace("/", "_").toLowerCase() + "_" + lcViewName;
propFileOperations
.addPropertyIfNotExists(
pathResolver.getFocusedPath(Path.SRC_MAIN_WEBAPP),
"WEB-INF/i18n/application.properties", messageCode,
title, true);
// Add the menu item
final String relativeUrl = folderName + "/" + lcViewName;
menuOperations.addMenuItem(new JavaSymbolName(category),
new JavaSymbolName(folderName.replace("/", "_").toLowerCase()
+ lcViewName + "_id"), title, "global_generic",
relativeUrl, null, webappPath);
// Add the view definition
tilesOperations.addViewDefinition(folderName.toLowerCase(),
pathResolver.getFocusedPath(Path.SRC_MAIN_WEBAPP), relativeUrl,
TilesOperations.DEFAULT_TEMPLATE,
"/WEB-INF/views" + folderName.toLowerCase() + "/" + lcViewName
+ ".jspx");
if (registerStaticController) {