return _simpleName;
}
private void searchForPage(IRequestCycle cycle)
{
INamespace namespace = getNamespace();
if (LOG.isDebugEnabled())
LOG.debug("Resolving unknown page '" + _simpleName + "' in " + namespace);
String expectedName = _simpleName + ".page";
IResourceLocation namespaceLocation = namespace.getSpecificationLocation();
// See if there's a specification file in the same folder
// as the library or application specification that's
// supposed to contain the page.
if (found(namespaceLocation.getRelativeLocation(expectedName)))
return;
if (namespace.isApplicationNamespace())
{
// The application namespace gets some extra searching.
if (found(getWebInfAppLocation().getRelativeLocation(expectedName)))
return;
if (found(getWebInfLocation().getRelativeLocation(expectedName)))
return;
if (found(getApplicationRootLocation().getRelativeLocation(expectedName)))
return;
// The wierd one ... where we see if there's a template in the application root location.
String templateName = _simpleName + "." + getTemplateExtension();
IResourceLocation templateLocation =
getApplicationRootLocation().getRelativeLocation(templateName);
if (templateLocation.getResourceURL() != null)
{
setupImplicitPage(templateLocation);
return;
}
// Not found in application namespace, so maybe its a framework page.
INamespace framework = getSpecificationSource().getFrameworkNamespace();
if (framework.containsPage(_simpleName))
{
if (LOG.isDebugEnabled())
LOG.debug("Found " + _simpleName + " in framework namespace.");
setNamespace(framework);
// Note: This implies that normal lookup rules don't work
// for the framework! Framework pages must be
// defined in the framework library specification.
setSpecification(framework.getPageSpecification(_simpleName));
return;
}
}
// Not found by any normal rule, so its time to