• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to determine which tabbed Pane is active in panelTabbedPane

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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<
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic