posted 16 years ago
Hey guys,
I have a form with two tabs inside it. At first, since it had some immediate fields and action listeners in the second tab, I decided to use a swithType="ajax" for the rich:tabPanel, so that when some interaction happened, after that the current tab would be the same as before, and not always the one determined by the selectTab field statically (the first one in this case).
But this choice did not last long because fields in non-active tabs were not validated before sending data to the backing bean, when the submit button was accessed being the second tab active. This way, I had to use swithType="client" again, with the drawback of returning to the first tab after some immediate call was done in the second tab.
After I tried to set immediate="true" for the rich:tabPanel, and then the non-immediate fields were never validated and also the backing bean never received the data.
Then, I put some listeners on these immediate buttons and the rich:tabPanel immediate field was "true" if one of these buttons was just accessed, and it almost worked fine... now, after the first time any immediate button from the second tab is accessed, any try of sending data refreshes back to the second tab, which was selected by the time that immediate was true for rich:tabPanel.
At this point, I don�t know if I�m facing a bug or not. But what I need is that the form should be aware of validation issues of fields in both tabs, at the same time that the current tab remains the same after any interaction with the server.
Does anybody know how to do that correctly?
Thank you all.
PS:
And also, in the case when immediate="true" for rich:tabPanel, if I set every field as immediate, validations occour, but data is never sent back. If I define the sending button as immediate, and empty bean appears instead of the correct inserted data.