Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to determine which tabbed Pane is active in panelTabbedPane  RSS feed

 
Narendra Payidiparthi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi All,
I need help to set the hidden variable with id="prefId" declared down to set to particular value based on the active or selected Tab.

Can you guys help me out how to determine the active tab in
t:panelTabbedPane and correstpondingly set for the hidden field.

I am new to JSF and I know this should be done through java script,

Can anybosy help me out



<f:view<
<html<
<body<
<f:loadBundle basename="com.cci.cz.bundle.CzResources" var="bundle"/<
<h:form id="mainOnlineForm">
<t:panelTabbedPane id="mainFilterPane" bgcolor="#FFFFCC" activeTabStyleClass="editorPane_activeTab" inactiveTabStyleClass="editorPane_inactiveTab" tabContentStyleClass="editorPane_tabContent" <
<t:panelTab id="allResults" label="All Contacts" title="All Contacts" <
<jsp:include page="FilterAllReport.jsp"/<
</t:panelTab<
<t:panelTab id="emailResults" label="Email Contacts" title="Email Contacts" <
<jsp:include page="FilterEmailReport.jsp"/<
</t:panelTab<
<t:panelTab id="faxResults" label="Fax Contacts" title="Fax Contacts" <
<jsp:include page="FilterFaxReport.jsp"/<
</t:panelTab<
<t:panelTab id="hardcopyResults" label="Hardcopy Contacts" title="Hardcopy Contacts" <
<jsp:include page="FilterHardcopyReport.jsp"/<
</t:panelTab<
</t:panelTabbedPane<
<h:inputHidden id="prefId" value="ALL" /<
</h:form<
</body<
</html<
</f:view<
 
Sachin Satija
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help...
http://myfaces.apache.org/tomahawk/apidocs/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPane.html#getSelectedIndex()


You can use getComponentById in the backing bean to get the component and dynamically remove/add components to it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!