Vipul
Vipul

Reputation: 836

JSF rich:tab switchType=ajax update first tab

i am using rich faces.

<rich:tabPanel id="feedModifyDetails" switchType="client">
     <rich:tab id="ftpDefaultValuePanel" header="FtpDefaults">
           some code
     </rich:tab>

     <rich:tab id="feedSchedule" header="FeedSchedules" >       
           some code
     </rich:tab>

     <rich:tab id="feedFTPCommunicationParams" header="FeedFTPCommunicationParams">                                                      
           some code
     </rich:tab> 

     <rich:tab id="feedFTPErrorEscalations" header="FeedFTPErrorEscalations"  
             switchType="ajax">
           <ui:include src="ftpErrorEscalations.xhtml" />
     </rich:tab>    

     <rich:tab id="ftpErrorAction" header="FtpErrorActionDefaults"  switchType="ajax">
            <ui:include src="ftpErrorAction.xhtml" />
     </rich:tab>     
 </rich:tabPanel>

As show in above code

  1. for rich:tabPanel i am using switchType="client".
  2. for last 2 rich:tab i have used switchType="ajax".

Expected Result:

  1. Last two tab will be loaded when user click on tab.

Error: When user click on any one of last tab(AJAX request tab) a ajax request is sent but response will update first tab i.e: <rich:tab id="ftpDefaultValuePanel" header="FtpDefaults" >

Does i am doing somthing wrong?

Upvotes: 2

Views: 2495

Answers (1)

Vikas V
Vikas V

Reputation: 3186

By putting immediate=true for ajax request tabs you can indicate that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase.

Upvotes: 1

Related Questions