0

I am working an primefaces application, I am using Primefaces 5.x version, Jsf 2.x

which has tabview in one of the tabs I have command button, by clicking on it pdf export should happen.

For the first time click on button page is getting reloaded, from the second time on words request is going to bean page and downloading is working correctly.

this is my code snippet for command button :

<h:form id="mainForm">

<p:tabView id="myId" activeIndex="#{bean.currentTabIndex}" dynamic="true" cache="false">

<p:tab title="vehicle" id="vehId" styleClass="panelBack">
    <h:form id="exportForm">
       // some code


<p:commandButton value="export"  process="@this"  actionListener="# {bean.export()}" ajax="false" id="exportButton" />
        </h:form>

    </h:form>

If I make dynamic = false, it's working. I mean after clicking export button request is going to bean class, export is working.

What would be the problem? Can somebody help me?

Thank you

Naveen Kocherla
  • 399
  • 9
  • 27
  • Possible duplicate of [commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated](https://stackoverflow.com/questions/2118656/commandbutton-commandlink-ajax-action-listener-method-not-invoked-or-input-value) – Kukeltje Jul 06 '18 at 06:59
  • Nmber 2 in https://stackoverflow.com/questions/2118656/commandbutton-commandlink-ajax-action-listener-method-not-invoked-or-input-value – Kukeltje Jul 06 '18 at 06:59

1 Answers1

0

Yes your problem is most likely nested that is not allowed in JSF.

Melloware
  • 10,435
  • 2
  • 32
  • 62
  • Then please vote to close as a duplicate, No need to answer then. And nested forms is not allowed in html, not only jsf – Kukeltje Jul 06 '18 at 11:37
  • Sorry i have never voted to close as a duplicate. Can you instruct on how? According to this post: https://stackoverflow.com/help/privileges/close-questions I need 3000 reputation? – Melloware Jul 06 '18 at 14:01
  • Sorry You are right I did not think about the reputation Points You Need For This – Kukeltje Jul 06 '18 at 16:25
  • But Maybe you can Flag it for moderation and in the command State that it can be closed end Sorry For All The Wrong capitalization Google Voice Recognition is not doing A Very Good Job Here – Kukeltje Jul 06 '18 at 16:26