return false;
} else {
path = FacesContextUtility.getRequest().getRequestURI();
//Resource resource = this.resourceManager.getResourceById(subject, ((Resource) node.getData()).getId());
ResourceFacets facets = this.resourceTypeManager.getResourceFacets(flyweight.getResourceType()
.getId());
String fallbackPath = FunctionTagLibrary.getDefaultResourceTabURL();
// Switching from a auto group view... default to monitor page
if (!path.startsWith("/rhq/resource")) {
path = fallbackPath;
} else {
if ((path.startsWith("/rhq/resource/configuration/") && !facets.isConfiguration())
|| (path.startsWith("/rhq/resource/content/") && !facets.isContent())
|| (path.startsWith("/rhq/resource/operation") && !facets.isOperation())
|| (path.startsWith("/rhq/resource/events") && !facets.isEvent())) {
// This resource doesn't support those facets
path = fallbackPath;
} else if ((path.startsWith("/rhq/resource/configuration/view-map.xhtml")
|| path.startsWith("/rhq/resource/configuration/edit-map.xhtml")
|| path.startsWith("/rhq/resource/configuration/add-map.xhtml") || path
.startsWith("/rhq/resource/configuration/edit.xhtml")
&& facets.isConfiguration())) {
path = "/rhq/resource/configuration/view.xhtml";
} else if (!path.startsWith("/rhq/resource/content/view.xhtml")
&& path.startsWith("/rhq/resource/content/") && facets.isContent()) {
path = "/rhq/resource/content/view.xhtml";
} else if (path.startsWith("/rhq/resource/inventory/")
&& !(path.startsWith("/rhq/resource/inventory/view.xhtml")
|| (facets.isPluginConfiguration() && path
.startsWith("/rhq/resource/inventory/view-connection.xhtml")) || path
.startsWith("/rhq/resource/inventory/view-agent.xhtml"))) {
path = "/rhq/resource/inventory/view.xhtml";
} else if (path.startsWith("/rhq/resource/operation/resourceOperationHistoryDetails.xhtml")) {
path = "/rhq/resource/operation/resourceOperationHistory.xhtml";
} else if (path.startsWith("/rhq/resource/operation/resourceOperationScheduleDetails.xhtml")) {
path = "/rhq/resource/operation/resourceOperationSchedules.xhtml";
} else if (path.startsWith("/rhq/resource/monitor/response.xhtml") && !facets.isCallTime()) {
path = fallbackPath;
}
}
path += ("?id=" + flyweight.getId());