0

I have an AccordionPanel created programatically inside which an AJAX event is defined (also programatically) now i want to change UPDATE property of ajax dynamically on tab change event defined in above AJAX.

i have tried to change using myAjax.setUpdate(stringVariable) using variable on ajax tab change event Method but this doesn't Work . Component are Build using primeFaces Jar

UPDATE

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<h:head>
</h:head>

<h:body>

    <h:form id="accordionForm">
           <h3>Change Event</h3>
    <p:accordionPanel id="saurabhpanel" multiple="true">
        <p:ajax event="tabChange" listener="#{tabbedView.onTabChange}" update="@this" />

         <p:tab  id ="tab1" title="saurabh" binding="#{tabbedView.tab}">

        </p:tab>
        <p:tab id="tab2" title="sau" binding="#{tabbedView.tab2}">

        </p:tab>

    </p:accordionPanel>
    </h:form>
</h:body>
</html>

This above code is working fine but when i create accordionpanel using java code and define ajax using code then on tab change it says component already exist For my previous tab i don't know why it try to update my previous open tab

saurabhiitr
  • 47
  • 1
  • 7

0 Answers0