Tabbed pane validation on tab switch
Hello,
i have a problem with tabbed pane validating on the tab switch. I am using tomahawk HtmlPanelTabbedPane. I created a tabchangelistener in which i'd like to validate the previous tab and if it is invalid, i'd like to return to it and have the messages properly displayed there.
In my code i call input.validate(context) on all inputs on the previous tab and FacesContext.getMessages() is getting populated with "invalid field" messages but i am not able to go back to that previous tab. I tried calling context.renderResponse() and context.responseComplete() but both throwing error.
I use tabPane.setServerSideTabSwitch(true) and ajaxAnywhere so that the refreshing is happening on the client side without visible call to the server. Also, i am using Sandbox Subforms instead of subviews, so if there is a way to somehow submit the subform on that tab event, it may do the trick as well. The only concern i have is that it would be a second submit, since to get a tab event, the tabbedpane already posted one submit request.
Any help would be much appreciated!