I try to run RichFaces4 app but the components don't render. For example when I try this demo: Demo I get something like this:
Here is an example of default tab panel with 3 tabs.
j_id1475365623_57f04a9f j_id1475365623_57f04a9f j_id1475365623_57f04a9f
j_id1475365623_57f04a75 j_id1475365623_57f04a75 j_id1475365623_57f04a75
j_id1475365623_57f04a6b j_id1475365623_57f04a6b j_id1475365623_57f04a6b
?
↓
?
Here is tab #1
Here is an example of tab panel switched in "ajax" style. Second tab is disabled.
j_id1475365623_57f04a27 j_id1475365623_57f04a27 j_id1475365623_57f04a27
j_id1475365623_57f04a1d j_id1475365623_57f04a1d j_id1475365623_57f04a1d
j_id1475365623_57f04bf3 j_id1475365623_57f04bf3 j_id1475365623_57f04bf3
?
↓
?
Here is tab #1
Here is an example of tab panel switched completely on client.
j_id1475365623_57f04bcf j_id1475365623_57f04bcf j_id1475365623_57f04bcf
j_id1475365623_57f04ba5 j_id1475365623_57f04ba5 j_id1475365623_57f04ba5
j_id1475365623_57f04b9b j_id1475365623_57f04b9b j_id1475365623_57f04b9b
?
↓
?
Here is tab #1
Here is tab #2
Here is tab #3
My code is almost the same as in the demo. I just added form tag becouse it complained for it.
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<p>Here is an example of default tab panel with 3 tabs.</p>
<h:form>
<rich:tabPanel>
<rich:tab label="First">
Here is tab #1
</rich:tab>
<rich:tab label="Second">
Here is tab #2
</rich:tab>
<rich:tab label="Third">
Here is tab #3
</rich:tab>
</rich:tabPanel>
<br/><br/>
<p>Here is an example of tab panel switched in "ajax" style. Second tab is disabled.</p>
<rich:tabPanel switchType="ajax">
<rich:tab label="First">
Here is tab #1
</rich:tab>
<rich:tab label="Second" disabled="true">
Here is tab #2
</rich:tab>
<rich:tab label="Third">
Here is tab #3
</rich:tab>
</rich:tabPanel>
<br/><br/>
<p>Here is an example of tab panel switched completely on client.</p>
<rich:tabPanel switchType="client">
<rich:tab label="First">
Here is tab #1
</rich:tab>
<rich:tab label="Second">
Here is tab #2
</rich:tab>
<rich:tab label="Third">
Here is tab #3
</rich:tab>
</rich:tabPanel>
</h:form>
</ui:composition>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…