I have a problem with my accordionPanel with two tabs and required fields in both tabs. The accordionPanel is in one form and when I submit the form both validations fail.
Code: Select all
<h:form>
<p:accordionPanel autoHeight="false" activeIndex="-1" dynamic="true" cache="false">
<p:tab title="Tab 2" id="t1">
<p:inputText id="reqTest1" required="true"/>
</p:tab>
<p:tab title="Tab 2" id="t2">
<p:inputText id="reqTest1" required="true"/>
</p:tab>
</p:accordionPanel>
</h:form>
Now I want the validation only on the one tab that is expanded and not on both. I can't use two forms because I have some content around the accordion to submit too.
Has anyone an idea for this or an alternative component to use?
I need a dynamic content with header and only one at a time expanded and validated.