Bug 534574 (RHQ-1358)

Summary: tree nav needs to fall back to guaranteed-to-exist tab when context not available
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: Core UIAssignee: Greg Hinkle <ghinkle>
Status: CLOSED NEXTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: high    
Version: 1.2CC: cwelton
Target Milestone: ---Keywords: SubBug
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-1358
Whiteboard:
Fixed In Version: 1.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 534474    

Description Joseph Marques 2009-01-14 01:11:00 UTC
it appears that the resource tree nav will attempt to stay on the same tab as i click on different resources in the hierarchy.  however, if i'm on a tab that exists for one resource, and click over to a resource that doesn't exist, it will blow up with the following stack trace:

Subtabs for selected tab 'Configuration' were not rendered - the tab is most likely not legitimate for the current resource.

java.lang.IllegalStateException: Subtabs for selected tab 'Configuration' were not rendered - the tab is most likely not legitimate for the current resource.
	at org.rhq.enterprise.gui.common.tabbar.TabBarRenderer.writeSubTabs(TabBarRenderer.java:116)
	at org.rhq.enterprise.gui.common.tabbar.TabBarRenderer.encodeEnd(TabBarRenderer.java:81)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:849)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
	at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
	at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
	at org.ajax4jsf.Filter.doFilter(Filter.java:175)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.rhq.enterprise.gui.legacy.AuthenticationFilter.doFilter(AuthenticationFilter.java:129)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.rhq.enterprise.gui.common.upload.MultipartFilter.doFilter(MultipartFilter.java:63)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.rhq.helpers.rtfilter.filter.RtFilter.doFilter(RtFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)

if this happens, we should catch the error and default back to some tab that we know will exist such as inventory.

Comment 1 Joseph Marques 2009-01-14 09:01:10 UTC
RHQ-1358 and RHQ-1359 are related, but distinct issues.  RHQ-1359 concerns the need for explicit context switching between the resource and autogroup contexts.  RHQ-1358 talks about the need for intelligent subsystem context fallback when the implied/sticky context does not exist for the target.

the link structure in general looks like: /rhq/<entityContext>/<subsystemContext>/<subsystemSubTab>.xhtml

RHQ-1359 issue deals with incorrect manipulation of the <entityContext> // values are "resource" and "autogroup"
RHQ-1358 deals with incorrect manipulation of the <subsystemContext> // values are "inventory", "configuration", "alerts", etc

Comment 2 Joseph Marques 2009-01-14 09:05:21 UTC
to reproduce:
* go to some resource that supports configuration
* switch to the configuration tab
* click on some resource that doesn't support configuration <-- boom

Comment 3 Corey Welton 2009-03-25 12:45:06 UTC
QA Verified, navigating from the config tab of a resource to another resource root no longer causes an exception. 

Comment 4 Red Hat Bugzilla 2009-11-10 20:31:16 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1358
This bug relates to RHQ-1359


Comment 5 David Lawrence 2009-11-11 17:18:07 UTC
*** Bug 534688 has been marked as a duplicate of this bug. ***