Problema de Warning nos componetes de messagens

4 respostas
B

Eae galera…

Estou com o seguinte problema:

quando entro em uma página que contem um componente de mensagem, ele exibe varios warning.

Warning: This page calls for XML namespace declared with prefix tr but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix td but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix td but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix td but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix table but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix h3 but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix tr but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix a but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix p but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix p but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix p but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix img but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix div but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix td but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix td but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix td but no taglibrary exists for that namespace.
    Warning: This page calls for XML namespace declared with prefix table but no taglibrary exists for that namespace.

pra adiantar procurei e li em varios lugares sobre esse problema e todos falam que é falta da tag:

xmlns="http://www.w3.org/1999/xhtml"

mais eu utilizo isso já, nas minhas telas são assim:

Essas são as declarações do meu template.

<?xml version='1.0' encoding='UTF-8' ?>
<!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:p="http://primefaces.prime.com.tr/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">


e essas são as declarações da página que apresenta os Warnings:

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="meuTemplate.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

se alguém puder ajudar eu agradeço, pois isso esta se tornando já …
Obrigado.

4 Respostas

H
<!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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:f="http://java.sun.com/jsf/core">

Tente desse modo aí em cima.

B

Já é assim que eu uso no template, ou teria algo de diferente que eu não vi.

L

Acho que o DOCTYPE tá dando problema pra vc, pois está usando DTD e XSD num mesmo documento. Abaixo tem um arquivo meu que não da problema.

<?xml version="1.0" encoding="ISO-8859-1"?>
<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:p="http://primefaces.prime.com.tr/ui"
	template="/templates/default.xhtml">

	<ui:define name="content">
		<h:form id="form">
			<div class="center">
				<p:panel id="panel" header="Usuário" style="margin: auto; width: 80%;">
					<div>
						<p:messages id="mensagens" />
					</div>
					<h:panelGrid columns="2" columnClasses="p20, p80" style="margin: auto; text-align: left; width: 70%;">
						<h:outputText value="Login :" />
						<p:inputText id="login" value="#{usuarioBean.usuario.login}" size="20" maxlength="50" />
						<h:outputText value="Nome :" />
						<p:inputText id="nome" value="#{usuarioBean.usuario.nome}" size="40" maxlength="150" />
						<h:outputText value="Email :" />
						<p:inputText id="email" value="#{usuarioBean.usuario.email}" size="40" maxlength="150" />
						<h:outputText value="Grupo" />
						<p:selectOneMenu id="grupo" value="#{usuarioBean.grupo}">
							<f:selectItems itemDescription="Selecione" value="#{usuarioBean.grupos}" />
						</p:selectOneMenu>
						<h:outputText value="Ativo :" />
						<p:selectBooleanCheckbox value="#{usuarioBean.usuario.ativo}" />
						<h:outputText value="Senha :" />
						<p:password id="senha" value="#{usuarioBean.senha}"  size="20" maxlength="20" />
					</h:panelGrid>
					<p:commandButton value="#{empty usuarioBean.usuario.id ? 'Cadastrar' : 'Alterar'}" actionListener="#{usuarioBean.cadastrar}" ajax="true" update="form:panel,form:mensagens" />
					<p:spacer width="40" />
					<p:commandButton value="Voltar" action="#{usuarioBean.voltar}" immediate="true" ajax="false" />
				</p:panel>
			</div>
		</h:form>
	</ui:define>

</ui:composition>
B

Acabei de descobrir porque isso acontece:

No meu template eu tenho include de uma pagina HTML, quando eu retiro esse include HTML os warnings param! :slight_smile:
Eu tenho outros includes com XHTML que não dão esse problema, só os que são HTML.

<ui:include src="/cabecalho.html"/>

Agora como incluir uma página HTML se dar esses warnings ?

Criado 10 de novembro de 2011
Ultima resposta 11 de nov. de 2011
Respostas 4
Participantes 3