• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hard days with a rich:tabPanel inside a h:form

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic