Search code examples
javajsfrichfacesjava-ee-6

Richfaces tags are ignored


I use some Richfaces tags in my XHTML pages. But they are ignored.

It looks like enter image description here

Where is the problem? Any Idea?

I use Wepshere 8 as AppServer

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
<!-- html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
<head>
<title>RichFaces Greeter</title>
</head>
<body>
    <f:view -->
        <h:form>
            <rich:panel header="RichFaces Greeter" style="width: 315px">
                <h:outputText value="Your name: " />
                <h:inputText value="#{user.name}">
                    <f:validateLength minimum="1" maximum="30" />
                </h:inputText>
                <a4j:commandButton value="Get greeting" reRender="greeting" />
                <h:panelGroup id="greeting">
                    <h:outputText value="Hello, " rendered="#{not empty user.name}" />
                    <h:outputText value="#{user.name}" />
                    <h:outputText value="!" rendered="#{not empty user.name}" />
                </h:panelGroup>
            </rich:panel>
            <rich:inputNumberSlider minValue="1"  maxValue="100" showInput="false"/>
            <rich:inputNumberSpinner minValue="1" maxValue="100"/>  
        </h:form>
    <!-- /f:view>
</body>
</html -->
</ui:composition>

Solution

  • Try adding an h:head and h:body tag on the page instead of normal html tags head and body