4

Currently, i am dealing with rich:tabPanel in my web application based on JSF 2.0. I encounter a very strange problem, which is related to my richface component. Basically, i print some same stuff on each panel (here, it is a schedule table of a show, tab contains the day and content of tab contains the differents hours ).

Consequently, i have something like that:

<rich:tabPanel>
     <c:forEach items="#{show}" var="hour" ...>
       <rich:tab>
        <a4j:commandLink ...>
             <a4j:param value="hour.something" assignTo="#{bean.method}" />
        </a4j:commandLink>
     </ ..... >

When i click on the first commandlink, when my webpage is displayed, it's ok. But when i choose an other tab, and i click on the commandlink, the "bean.method" is not call. I need to click a second time to make the call of the function.

Finally, when i put the tabPanel as "switchtype=server", it works very well (without clicking 2 times).

But that's not the purpose, i want to use the client mode. I see that on JIRA of richfaces v3, this problem has been solved JIRA JBoss. But there is no more information (except a comment but it's not working).

If anyone can help, it would be great.

Regards,

  • 2
    Need more info. Please tell us **1.** Where is your form? **2.** Don't you like to change the `switchType` to `ajax`? – prageeth Nov 22 '12 at 03:42
  • There are 2 forms: The **first** surrounding the rich:tabpanel, the **second** surrounding the commandlink inside my rich:tab. Changing the switchType with `ajax` doesn't change something, same thing occurs. – user1843642 Nov 22 '12 at 12:36

1 Answers1

2

The problem is you are using nested forms(form within form). This is not recommended in JSF. Even in HTML it is invalid. Remove one form and it will work.
Read this post too.

Community
  • 1
  • 1
prageeth
  • 6,524
  • 7
  • 38
  • 66