RichFaces

Eu estou tentando usar exemplos do : http://liferay.exadel.com/, que são para jsf, pois bem !

NEM 1 DELES FUNCIONA

esta parte do código vai dentro do jsp ? ou tenho que criar um xm e por ele tipo css ? e mandar incluir na página jsp ?


<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">

exemplo :

<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">

    <style>
        .tooltip {
            background-color:#{richSkin.generalBackgroundColor};
            border-width:3px;
            padding:10px;
        }
        .tooltip-text {
            width:350px;
            height:80px;
            cursor:arrow;
            border-width:2px;
            text-align:center;
            display: table-cell;
            vertical-align: middle; 
        }
        .tooltipData {
            font-weight: bold;
        }
    </style>
    
    <h:panelGrid columns="2">
    <rich:panel id="sample1" styleClass="tooltip-text">
        <p>
            Here you can see <b>default client-side</b> tool-tip
        </p>
        &lt;rich:toolTip&gt;
            &lt;span style="white-space:nowrap"&gt;
                This tool-tip content was &lt;strong&gt;pre-rendered&lt;/strong&gt; to the page.<br/>
                The look of this tool-tip is 100% defined by skin.
            &lt;/span&gt;
        &lt;/rich:toolTip&gt;
    &lt;/rich:panel&gt;
    &lt;rich:panel id="sample2" styleClass="tooltip-text"&gt;
        <p>
            This tool-tip will <b>follow mouse</b>. Also this tool-tip has a <b>delay 0.5 sec</b>,
             so be patient!
        </p>
        &lt;rich:toolTip followMouse="true" direction="top-right" showDelay="500" styleClass="tooltip"&gt;
            &lt;span  style="white-space:nowrap"&gt;
                This tool-tip content also &lt;strong&gt;pre-rendered&lt;/strong&gt; to the page.<br/>
                However, the look of this tool-tip is customized<br/>
                by styleClass attribute.
            &lt;/span&gt;
        &lt;/rich:toolTip&gt;
    &lt;/rich:panel&gt;
    &lt;h:form&gt;
    &lt;rich:panel  id="sample3" styleClass="tooltip-text"&gt;
        <p>
            This tool-tip rendered on server <b>in separate request</b>.
        </p>
        &lt;rich:toolTip direction="top-right" mode="ajax" styleClass="tooltip" layout="block"&gt;
            &lt;f:facet name="defaultContent"&gt;
                &lt;strong&gt;Wait...&lt;/strong&gt;
            &lt;/f:facet&gt;
            &lt;span   style="white-space:nowrap"&gt;This tool-tip content was &lt;strong&gt;rendered on server&lt;/strong&gt;
             &lt;/span&gt;
            &lt;h:panelGrid columns="2"&gt;
                &lt;h:outputText   style="white-space:nowrap" value="tooltips requested:" /&gt;
                &lt;h:outputText value="#{toolTipData.tooltipCounter}" styleClass="tooltipData" /&gt;
            &lt;/h:panelGrid&gt;
        &lt;/rich:toolTip&gt;
    &lt;/rich:panel&gt; 
    &lt;/h:form&gt;
    &lt;h:form&gt;
    &lt;rich:panel  id="sample4" styleClass="tooltip-text"&gt;
        <p>
            This tool-tip will be <b>activated on mouse click</b>. It also has a <b>bottom-left</b> position.
        </p>
        &lt;rich:toolTip showEvent="onclick" direction="bottom-left" mode="ajax" styleClass="tooltip" layout="block"&gt;
            &lt;f:facet name="defaultContent"&gt;
                &lt;strong&gt;Wait...&lt;/strong&gt;
            &lt;/f:facet&gt;
            &lt;span   style="white-space:nowrap"&gt;This tool-tip content was &lt;strong&gt;rendered on server&lt;/strong&gt;<br/>&lt;/span&gt;
            &lt;h:panelGrid columns="2"&gt;
                &lt;h:outputText  style="white-space:nowrap" value="tooltips requested:" /&gt;
                &lt;h:outputText value="#{toolTipData.tooltipCounter}" styleClass="tooltipData" /&gt;
            &lt;/h:panelGrid&gt;
        &lt;/rich:toolTip&gt;
    &lt;/rich:panel&gt;
    &lt;/h:form&gt;
&lt;/h:panelGrid&gt;


&lt;/ui:composition&gt;

ele ate mostra os componentes mas não tem ação eles ficam imóvel !

não essa parte também fica no dentro do jsp.

antes de tudo você tem que verificar se você tem incluido no seu classpath as bibliotecas do Facelets, e do Richfaces se tiver depois verifique as configuração dos mesmo no facesConfig.xml e no web.xml. Provavelmente é este ponto que possa estar ocacionando o erro.

outra coisa o seu deve estar dentro um um

exemplo:

<html 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">

    <head>
        <title>Mapa do Conhecimento</title>
        <link type="text/css" rel="stylesheet" media="screen" href="estilos/estilos.css" />
        <script type="text/javascript" src="scripts/util.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <!--[if IE]>
		<link type="text/css" rel="stylesheet" media="screen" href="estilos/IEhacks.css" />
        <![endif]-->
    </head>

    <body>

        <f:view contentType="text/html">

            <h:form id="frmPrincipal">

                <p id="cabecalho"></p>
                <div id="dados">
                    <p class="right">EQUIPE GISUT/FL</p>
                    <p class="left"><img src="images/user.gif" alt="Usuario"/>Matricula: <!--h:outputText id="txtLogin" value="{Autenticacao.funcionario.login}"/--> Usuário: <!--h:outputText id="txtUsuario" value="{Autenticacao.funcionario.nome}"/--></p>
                    <br />
                    <p>
                        <h:commandLink id="linkSair" styleClass="botao right" value="Sair" action="#{Autenticacao.logout}" immediate="true"/>
                        <h:commandLink id="linkRelatorio" styleClass="botao right" value="Relatório"  action="relatorio" immediate="true" />
                        <h:commandLink id="linkRelatorioGeral" styleClass="botao right" value="RelatórioGeral" action="relatorioGeral" immediate="true"/>
                        <h:commandLink id="linkFormulario"  styleClass="botao right" value="Formulario" action="formulario" immediate="true"/>
                        <h:commandLink id="linkHome"  styleClass="botao right" value="Home" action="home" immediate="true"/>
                    </p>
                </div>

                <div id="conteudo">
                    <ui:insert name="conteudo">Conteúdo Padrão</ui:insert>
                </div>

            </h:form>

        </f:view>

    </body>

</html>

como eu faço para mostrar uma mensagem na tela tipo showmessage ? tipo a do GWT ou jquery ?

Valeu obrigado !