Cannot change server-type rich:tab
freemarket Jan 16, 2009 4:45 PMHi,
I have the following facelet:
<rich:tabPanel id="l3tabpanel" switchType="server" activeTabClass="tertiaryTab-activeTab" inactiveTabClass="tertiaryTab-inactiveTab" selectedTab="#{navigationBackingBean.nav.tabs[1].tabs[0].selectedTabName}" contentClass="sub_tertiary_nav_container"> <rich:tab id="obligorAccountData" name="#{navigationBackingBean.nav.tabs[1].tabs[0].tabs[0].name}" label="#{resourceKeys.nav_tertiary_od}" rendered="#{navigationBackingBean.obligorViewEntitled}"> <c:if test="${sessionScope.navigationBackingBean.nav.tabs[1].tabs[0].isSelectedTab[0]}"> <c:choose> <c:when test="${sessionScope.sessionInfoBackingBean.obligorInformationView}"> <ui:include src="/content/obligorInfo-content.xhtml"/> </c:when> <c:otherwise> <ui:include src="/content/obligorEdit-content.xhtml"/> </c:otherwise> </c:choose> </c:if> </rich:tab> <rich:tab id="statementData" name="#{navigationBackingBean.nav.tabs[1].tabs[0].tabs[1].name}" label="#{resourceKeys.nav_tertiary_sd}" rendered="#{navigationBackingBean.statementViewEntitled}"> <c:if test="${sessionScope.navigationBackingBean.nav.tabs[1].tabs[0].isSelectedTab[1]}"> <c:choose> <c:when test="${requestScope.StatementEditBackingBean.editState == 'New' || requestScope.StatementEditBackingBean.editState == 'Edit'}"> <ui:include src="/businessAnalysis-statementEdit.xhtml" /> </c:when> <c:otherwise> <ui:include src="/content/businessAnalysis-obligor-creditFactorData-content.xhtml"/> </c:otherwise> </c:choose> </c:if> </rich:tab> <rich:tab name="" disabled="true" styleClass="extendRichTab"/>
which I am testing a click path using the following JSFUnit code:
private String StmtDataTab = "obligorNavigationForm:statementData"; private String tabPanel = "l3tabpanel"; private String stmtViewSelect = "statementViewList"; private String orgData = "Organization Data"; jsfSession = new JSFSession(wcSpec); client = jsfSession.getJSFClientSession(); ajaxClient = new RichFacesClient(this.client); server = jsfSession.getJSFServerSession(); HtmlTabPanel tabpanel = (HtmlTabPanel)server.findComponent(tabPanel); String selPanel = (String)tabpanel.getSelectedTab(); assertEquals(orgData, selPanel); HtmlTab panel = (HtmlTab)server.findComponent(StmtDataTab); assertNotNull(panel); ajaxClient.clickTab(StmtDataTab); HtmlSelect stmtSelect = (HtmlSelect)client.getElement(stmtViewSelect); int numOptions = stmtSelect.getOptionSize();
Yet stmtSelect is always null and the attempt to click on the tab (using server switch type) does not change the underlying content.
This is richfaces 3.2.2 with JSFUnit 1.0.0.GA-SNAPSHOT.
How do I change server side tabs?
Thanks,
Henry