This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Tab Panel not rendering properly in a template Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Tab Panel not rendering properly in a template" Watch "Tab Panel not rendering properly in a template" New topic
Author

Tab Panel not rendering properly in a template

Kim Ming Yap
Ranch Hand

Joined: Dec 17, 2008
Posts: 53

Sorry for posting here but the original thread was posted in Jboss but since i didn't get any response, i thought of posting it here.

The original URL post in jboss is:
http://community.jboss.org/thread/167539?tstart=0

Since doc files are not allowed to be attached here, please refer to the jboss link to look at the screenshot found on 2 attached files there.

Here's the original post:

I'm having a problem where tabpanel is not rendering properly in a template. In short, the steps are explained in sequences.

===================================================================

Clause A) Main template

<!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:ui="http://java.sun.com/jsf/facelets"

xmlns:rich="http://richfaces.org/rich">


<h:head>

<title>MView Analytics Reporting</title>

<h:outputStylesheet library="css" name="styles.css" />

<h:outputScript library="javascript" name="realTimeClock.js"/>

</h:head>

<h:body onload="updateClock(); setInterval('updateClock()', 1000 )">

<div id="sidebarLeft">

<ui:insert name="sidebarLeft">

<ui:include src="/sections/sideBarLeft.xhtml"/>

</ui:insert>

</div>

<div id="contents">

<!--
<ui:insert name="contents"/>
-->
<h:form id="frmSecurityHoldings">

<rich:tabPanel id="tabs" switchType="client">

<rich:tab id="listTab1" label="List">abc

</rich:tab>

</rich:tabPanel>

</h:form>

</div>

<ui:debug/>

</h:body>


</html>



===================================================================



Clause B) sideBarLeft.xhtml page.



In /sections/sideBarLeft.xhtml .. portion of the code is as follows:

:

<rich:panelMenuGroup label="Enquiry Management">
<rich:panelMenuItem label="Profile"/>
<rich:panelMenuItem label="Security Holdings" action="/sections/securityHoldings.xhtml"/>
<rich:panelMenuItem label="Client Transactions"/>
<rich:panelMenuItem label="Rate of Return"/>

:

When i click the "Security Holdings", it will bring me to securityHoldings.xhtml page.


===================================================================


Clause C) securityHoldings.xhtml page.

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html"
template="/templates/masterLayout.xhtml">

<ui:define name="contents">
<h:form>
<rich:panel>testing</rich:panel>
<rich:tabPanel>
<rich:tab header="first" id="first">first</rich:tab>
</rich:tabPanel>
</h:form>
</ui:define>

</ui:composition>


===================================================================



Clause D)


a) If i were to use the forms as in clause A) (bolded), the results is shown in attachment result1.doc

b) If i were to comment the forms as in clause A) and uncomment the <ui:insert name="contents"/>, the results is shown in attachment result2.doc. This is really strange where the panel get rendered correctly while the tabPanel otherwise. Possible bug in richfaces4.0?

Summary:
I couldn't figure out why using the latter would cause the tabpanel not rendering properly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tab Panel not rendering properly in a template
 
Similar Threads
trying to reRender part of page, but getting whole page refresh
Error:The XML page cannot be displayed Cannot view XML input using style sheet
why isnt this page showing three content panes where I am trying to put them?
Facelets and JSF
Bug in chrome