Please provide your code. I can't reproduce this on my simple examples.
That can happen if validation failed (eg. input text is empty). Do you have <h:messages /> somewhere on the page? Are there any?
And I hope you put some values to your required fields before switching?
If you need to have input values as required only for the controls except tabs - do not wrap your whole tabPanel to form. Just wrap the content of the every tab. - switching will be available with empty fields but form submit - not.
I'm afraid I can't send code until next Monday. I'll explain its structure and my objective:
I have fields distributed on tabs. h:messages was outside tab group, which was inside a h:form (as documentation said). Te problem arises when you put required="true" on any field.
Because of your comments I've realized I commited a silly mistake: if I put h:messages inside the tab it would've probably shown the message.
I was thinking on letting the user move through the tabs without validating, which would be done in the final submission, but maybe it's more intelligent and usable validating each tab independly.
Anyway, if you could tell me if I can do the other thing (validating only with a submission) it would be great.
Thank you very much!
If you have a h:messages, do not forget to surround it with a4j:outputPanel ajaxRendered="true". I.e:
<a4j:outputPanel ajaxRendered="true"> <h:messages /> </a4j:outputPanel>
Otherwise, the message is not appear during the ajax response if validation is failed.
Simplier way to validate the whole tabPanel on submit but switch it without any validation - is using switchMode="client" for the tabPanel.