thanks for answer,
but it's not so simple
i'm implementing wizard in p:tabView ( i need clickable headers ),
so I'm doing something like this:
Code: Select all
<script type="text/javascript">
var rd = false;
var oldTabIndex = 0;
var newTabIndex = 0;
</script>
<p:remoteCommand name="nextView" update="tvAnkieta,ankieta_id,krokankiety" process="tvAnkieta,krokankiety" oncomplete="if(!args.validationFailed ) {rd = true; tvAnkieta.select(newTabIndex)}"/>
<p:tabView id="tvAnkieta" dynamic="true" activeIndex="#{bean.selectedIndex}" widgetVar="tvAnkieta" onTabShow="oldTabIndex = tvAnkieta.getActiveIndex();" onTabChange="newTabIndex = index; if(rd == false) { $('.ui-submit-param').remove();nextView(); return false;} else {rd = false;}">
<p:ajax event="tabChange" listener="#{bean.onTabChange}" process="tvAnkieta" update="tvAnkieta,:form:wizard_actions,:form:krokankiety"/>
<p:tab title="Dane podstawowe">
</p:tab>
<p:tab title="Szablony">
</p:tab>
<p:tab title="Edytor ankiety">
</p:tab>
<p:tab title="Opcje">
</p:tab>
<p:tab title="Wysylka">
</p:tab>
</p:tabView>
<h:panelGroup id="krokankiety" layout="block">
<ui:include src="/WEB-INF/pages/wizard/#{bean.wizardPage}.xhtml" />
</h:panelGroup>
i'm processing current tab and if there is no validationErrors I change tab with javascript,
so i need to process only component with id krokankiety ( current tab ) and i want to put it into tabView so it looks nicely
if I add ui:include in all p:tabs there are multpile IDs .
maybe there is a way to do clickable headers on p:wizard ( i also want to click on every tab ) ?
Andrzej