1

私はコアとhtml jsf taglibsのみを使用して作成したjsfプロジェクトを持っていますが、フォームのコンポーネントはひどく見えるので、スキンを追加できるようにリッチフェイスを追加しようとしています。リッチフェイスの場合は次のとおりです。

  • richfaces-core-api-4.3.4.Final.jar
  • richfaces-core-impl-4.3.4.Final.jar
  • richfaces-components-api-4.3.4.Final.jar
  • richfaces-components-ui-4.3.4.Final.jar
  • cssparser-0.9.5.jar
  • グアバ-r09.jar
  • sac-1.3.ソース、jar

私のweb.xmlは次のようになります

 <servlet>
      <servlet-name>FacesServlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
      </servlet>
 <servlet-mapping>
  <servlet-name>FacesServlet</servlet-name>
  <url-pattern>*.xhtml</url-pattern>
 </servlet-mapping>

 <filter>  
     <!-- Nome que indentifica o filtro pode ser qualquer um -->
    <filter-name>LoginWard</filter-name> 
    <!-- Endereço da classe que herda de javax.servlet.Filter com o nome dos pacotes e sem .java ex: org.otkdrg.NomeDaClasse --> 
    <filter-class>br.com.gbcCalcados.moduloVendas.filter.LoginWard</filter-class>  
</filter> 
<filter-mapping>  
    <filter-name>LoginWard</filter-name>  
    <url-pattern>*.xhtml</url-pattern>  
</filter-mapping>  

<context-param>  
<param-name>org.richfaces.CONTROL_SKINNING</param-name>  
<param-value>enable</param-value>  
</context-param>  

<context-param> 
<param-name>org.richfaces.SKIN</param-name> 
<param-value>classic</param-value> 
</context-param> 

プロジェクトを実行しても何も起こりません。例外でさえありません。

ここにページがあります

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

    <ui:composition template="/WEB-INF/templates/gbcTemplate.xhtml" 
     xmlns:rich="http://richfaces.org/rich"  
      xmlns:a4j="http://richfaces.org/a4j" >
        <ui:define name="Conteudo">
        <div id="funcFormDiv" align="center">
            <h:form>
            <h:messages/>
                <h:outputLabel for="campoNome" value="Nome Completo:"/><br/>    
                <h:inputText id="campoNome" required="true" value="#{cadastroFuncBean.nomeCompleto}" validatorMessage="O nome completo é composto de um ou mais nomes e não pode conter numeros" requiredMessage="O nome completo é obrigatorio" >
                 <f:validateRegex pattern="\D* \D*"/>
                </h:inputText><br/>

                <h:outputLabel for="campoUsuario" value="Nome de usuário:"/><br/>   
                <h:inputText id="campoUsuario" required="true" value="#{cadastroFuncBean.usuario}" requiredMessage="O nome de usuario é obrigatorio" validatorMessage="O nome de usuário deve conter no minimo 6 e no maximo 15 letras">
                    <f:validateLength minimum="6" maximum="15"/>
                </h:inputText><br/>

                <h:outputLabel for="campoSenha" value="Senha:"/><br/>   
                <h:inputSecret id="campoSenha" required="true" value="#{cadastroFuncBean.senha}" requiredMessage="A senha é obrigatoria" validatorMessage="A senha deve conter no minimo 3 e no maximo 10 letras">
                    <f:validateLength minimum="3" maximum="10"/>
                </h:inputSecret><br/>

                <h:outputLabel for="campoNumContrato" value="Numero do contrato:"/><br/>    
                <h:inputText id="campoNumContrato" required="true" value="#{cadastroFuncBean.numContrato}" requiredMessage="O numero de contrato é obrigatorio" validatorMessage="Numero de contrato invalido">
                    <f:validateRegex pattern="^9\d{5}"/>

                </h:inputText><br/><br/><br/>
                <h:commandButton value="Enviar" action="#{cadastroFuncBean.cadastrar}"  /><input type="reset" value="Resetar" />
                <br/>
                <h:button id="voltar" value="Voltar para Login" outcome="login" />


            </h:form>
        </div>
        </ui:define>
    </ui:composition>
</html>

テンプレート:

<?xml version="1.0" encoding="UTF-8"?>
<html 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:rich="http://richfaces.org/rich"  
      xmlns:a4j="http://richfaces.org/a4j"  >

<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GBC calçados</title>
<h:outputStylesheet name="arquivo.css" library="css"/>
</h:head>

<h:body>
<div id="LoginInfoTab"><span id="LoginInfo">Usuário Logado:<h:outputText value="#{sessionScope['usuario_logado'] }"  /></span></div>
<div id="TopBanner"><h:graphicImage width="100%" library="images" name="TopBanner.jpg" /></div>

<div id="Menu" >
<h:form>
   <h:link outcome="clientesHome">
    <div class="menuItem">
        <span class="menuItemTexto">Clientes</span>
    </div>
   </h:link>
   <h:link outcome="vendasHome" >
    <div class="menuItem" id="botaoVendas">
        <span class="menuItemTexto">Vendas</span>
    </div>
   </h:link>

</h:form>
</div>

<div id="Content" align="center">
    <ui:insert name ="Conteudo"/>
</div>
<div id="BottomBanner"><h:graphicImage width="100%" library="images" name="BottomBanner.jpg" /></div>




</h:body>
</html>
4

0 に答える 0