robson_vs
lgweb:
O que vc gostaria de exibir?Seria as mensagens de erro em um modalPanel,é isto?
sim
robson_vs
e se possivel de uma forma generica
robson_vs
lgweb:
Funciona assim:
<rich:modalPanel id="error" autosized="true" showWhenRendered="#{facesContext.maximumSeverity !=null}">
<f:facet name="header">
<h:outputText value="#{msg.erros}"></h:outputText>
</f:facet>
<f:facet name="controls">
<h:graphicImage value="/images/BOTOES/cancel.png" width="20" height="20"styleClass="imagem"
style="cursor:pointer" onclick="Richfaces.hideModalPanel('error')" />
</f:facet>
<table class="blank" style="font-size: 10pt; white-space: nowrap">
<nobr>
<rich:messages>
<f:facet name="errorMarker">
<h:graphicImage value="/images/BOTOES/cancel.png"
width="20" height="20"styleClass="imagem"/>
</f:facet>
<f:facet name="warnMarker">
<h:graphicImage value="/images/info.png"
width="20" height="20"styleClass="imagem" />
</f:facet>
<f:facet name="infoMarker">
<h:graphicImage value="/images/accept.png"
width="20" height="20"styleClass="imagem" />
</f:facet>
</rich:messages>
</nobr>
</table>
</rich:modalPanel>
Testa aew depois me diga se funfou.
falow
ok valeu vou fazer um teste e te aviso.
Muito obrigado por enquanto
robson_vs
Então lgweb
Ainda ñ deu certo
fiz a seguinte página para testar mais nada sabe oque pode ser?
<?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:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:acegijsf="http://sourceforge.net/projects/jsf-comp/acegijsf"
template="/templates/template-pages.xhtml">
<ui:define name="pageTitle">titulo</ui:define>
<ui:define name="pageHeader">header</ui:define>
<ui:define name="body">
<h:form>
<h:inputText value="" required="true">
<f:validateLength minimum="1" maximum="3"/>
<f:validateLongRange minimum="0" maximum="1000"/>
</h:inputText>
<h:commandButton value="teste"/>
</h:form>
</ui:define>
</ui:composition>
os erros são jogados no console mais ñ no modalpanel
robson_vs
Cara desculpe tinha comido bola consegui resolver agora
é q como tinha feito em uma página a parte tinha esquecido de importar o conteúdo
com <ui:include src="/pages/modalPanelMessages.xhtml" />
meu código ficou assim para se mais alguem quizer fazer
messages.xhtml
<?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:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:acegijsf="http://sourceforge.net/projects/jsf-comp/acegijsf">
<rich:modalPanel id="msgsErros" autosized="true" showWhenRendered="#{facesContext.maximumSeverity !=null}">
<f:facet name="header">
<h:outputText value="#{msgs.}" />
</f:facet>
<f:facet name="controls">
<h:graphicImage value="/images/bt_fechar.png"
width="20"
height="20"
styleClass="imagem"
style="cursor:pointer"
onclick="Richfaces.hideModalPanel('msgsErros')" />
</f:facet>
<table class="blank" style="font-size: 10pt; white-space: nowrap">
<nobr>
<rich:messages>
<f:facet name="errorMarker">
<h:graphicImage value="/images/cancel.png"
width="20"
height="20"
styleClass="imagem"/>
</f:facet>
<f:facet name="warnMarker">
<h:graphicImage value="/images/info.png"
width="20"
height="20"
styleClass="imagem" />
</f:facet>
<f:facet name="infoMarker">
<h:graphicImage value="/images/accept.png"
width="20"
height="20"
styleClass="imagem" />
</f:facet>
</rich:messages>
</nobr>
</table>
</rich:modalPanel>
</ui:composition>
página_qualquer.xhtml
<?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:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:acegijsf="http://sourceforge.net/projects/jsf-comp/acegijsf"
template="/templates/template-pages.xhtml">
<ui:define name="pageTitle">titulo</ui:define>
<ui:define name="pageHeader">header</ui:define>
<ui:define name="body">
<ui:include src="/pages/messages.xhtml" />
<h:form>
<h:inputText value="" required="true">
<f:validateLength minimum="1" maximum="3"/>
<f:validateLongRange minimum="0" maximum="1000"/>
</h:inputText>
<h:commandButton value="submit"/>
<h:commandButton action="#{testeMBean.teste}" value="teste" immediate="true"/>
</h:form>
</ui:define>
</ui:composition>
ficou muito bom valeu a ajuda lgweb obrigadão
flaviojmendes
Cara, salvou a minha vida tb…
Brigadão!