0

We are working on JSF 2. We want an xhtml form to be displayed inside . Using , it is displaying the contents of the XHTML file. But actions on command buttons are not working.

We have created tabs.xhtml page which is directed first through index.xhtml page. The code is as follows:

<h:form>
    <rich:tabPanel>
       <rich:tab name="Second">
           <ui:include  src="/Second.xhtml" />
       </rich:tab>
       <rich:tab name="Third">
        Here is tab #3
       </rich:tab>
     </rich:tabPanel>
</h:form>

In Second.xhtml, we have ADD NEW, EDIT, DELETE buttons whose actions are not working after being included in tabs.

Please Help. Thanks in advance...

Heena Jain
  • 45
  • 1
  • 1
  • 7
  • 2
    does your Second.xhtml contains `` ? cause if it does you having nested forms (form inside form) which is baaaad... reorganize your pages so you wont have the nested forms (for example remove the form from Second.xhtml) – Daniel Mar 04 '13 at 07:59
  • Create many side-to-side local forms, as Daniel suggests. Also, take a look at the advice on [Multiple h:form in a JSF Page](http://stackoverflow.com/questions/7371903/multiple-hform-in-a-jsf-page/7372315#7372315). – skuntsel Mar 04 '13 at 08:06
  • @Daniel Thanks.Its working using a4j:region instead of forms. – Heena Jain Mar 04 '13 at 08:38

1 Answers1

0

Does your Second.xhtml contains <h:form> ?

Cause if it does you having nested forms (form inside form) which is baaaad... reorganize your pages so you won't have the nested forms

For example remove the form from Second.xhtml

Here a bit more about nested forms

Community
  • 1
  • 1
Daniel
  • 35,598
  • 9
  • 108
  • 184
  • We are working on JSF 2. Now, we are able to include xhtml page inside tabs. 'But now switching among other tabs is a problem. This is second tab We are successfully able to see FirstPage.xhtml. But cannot switch to Second tab. Help me. Thanks in advance!!! – Heena Jain Mar 04 '13 at 10:35
  • its a different question, check http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=tabPanel&sample=simple&skin=blueSky – Daniel Mar 04 '13 at 11:13