francis.junio 2 de ago. de 2010
Bom dia mrbbm…
Eu verifiquei isso e acho que nao é esse problema… Olha o codigo ai cara…
Esse é o modal que abre com as mensagens
<?xml version="1.0" encoding="ISO-8859-1"?>
<rich:modalPanel id= "_messagesPanel"
showWhenRendered= "#{not empty facesContext.maximumSeverity}"
autosized= "true" width= "250" height= "130" moveable= "true" xml:lang= "pt-br" lang= "pt-br"
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:rich= "http://richfaces.org/rich"
xmlns:a4j= "http://richfaces.org/a4j" >
<f:facet name= "header" >
<h:panelGroup style= "margin-right: 15px;" >
<h:outputText value= "Mensagens" />
</h:panelGroup>
</f:facet>
<f:facet name= "controls" >
<h:panelGroup>
<h:graphicImage value= "/images/close.png" id= "hidelink"
title= "Close" />
<rich:componentControl for= "_messagesPanel" attachTo= "hidelink"
operation= "hide" event= "onclick" />
</h:panelGroup>
</f:facet>
<h:form>
<rich:messages tooltip= "true" style= "white-space: pre;" >
<f:facet name= "passedMarker" >
<h:graphicImage url= "./images/sucesso.png"
style= "margin-right:5px; position: relative; top: 1px;" />
</f:facet>
<f:facet name= "errorMarker" >
<h:graphicImage url= "./images/erro.png"
style= "margin-right:5px; position: relative; top: 1px;" />
</f:facet>
<f:facet name= "fatalMarker" >
<h:graphicImage url= "./images/erro.png"
style= "margin-right:5px; position: relative; top: 1px;" />
</f:facet>
</rich:messages>
<rich:spacer width= "100%" height= "20" />
<h:panelGrid style= "text-align:center; margin: 0 auto; width: 100%;" >
<a4j:commandButton value= "Fechar" id= "_fecharButton"
onclick= "Richfaces.hideModalPanel('_messagesPanel');" ajaxSingle= "true" />
</h:panelGrid>
</h:form>
</rich:modalPanel>
Na pagina que aparece duplicada a mensagem o codigo fica assim…
<ui:composition template= "template.xhtml" >
<ui:define name= "conteudo" >
<rich:panel header= "Configuração" rendered= "#{baseMB.verifyHandHeld}" >
<h:form id= "frmAssociarUsers" >
<rich:toolBar itemSeparator= "line" height= "26" >
<rich:toolBarGroup>
<a4j:commandLink id= "linkNovo" title= "Novo"
action= "#{pesquisaPessoa.destroy}" reRender= "panelPessoa"
oncomplete= "Richfaces.showModalPanel('panelPessoa')" >
<h:graphicImage id= "image1" url= "/images/page_white.png"
style= "border:0; height: 17px;" />
</a4j:commandLink>
</rich:toolBarGroup>
</rich:toolBar>
<rich:spacer width= "100%" height= "15" />
<rich:dataTable rows= "20" id= "dtUsuColetor" width= "99%"
value= "#{usuariosAssociadosMB.dtModel}" var= "dt"
style= "text-align:center; font-family:verdana; font-size:11px"
reRender= "ds" >
<f:facet name= "header" >
<rich:columnGroup>
<rich:column colspan= "3" >
<h:outputText value= "Associar Usuário ao Coletor" />
</rich:column>
<rich:column breakBefore= "true" >
<h:outputText value= "Usuário" />
</rich:column>
<rich:column>
<h:outputText value= "Senha" />
</rich:column>
<rich:column>
<h:outputText value= "Controles" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<h:outputText value= "#{dt.user}" />
</rich:column>
<rich:column>
<h:outputText value= "#{dt.pwd}" >
<f:converter converterId= "passwordConvert" />
</h:outputText>
</rich:column>
<rich:column>
<a4j:commandLink id= "editar" title= "Editar"
action= "#{usuariosAssociadosMB.edit}"
reRender= "modalEditSenhaUserColetor"
oncomplete= "Richfaces.showModalPanel('modalEditSenhaUserColetor')" >
<h:graphicImage id= "imageEdit" url= "/images/editar.png"
style= "border:0" />
</a4j:commandLink>
<rich:spacer width= "7" />
<h:commandLink id= "excluir" title= "Excluir"
onclick= "javascript:return confirm('Deseja realmente excluir esse registro?');"
immediate= "true" action= "#{usuariosAssociadosMB.remove}" >
<h:graphicImage id= "imageExcluir" url= "/images/delete.png"
style= "border:0" />
</h:commandLink>
</rich:column>
<f:facet name= "footer" >
<rich:datascroller id= "ds" renderIfSinglePage= "false" ></rich:datascroller>
</f:facet>
</rich:dataTable>
</h:form>
</rich:panel>
//----------ESTE É O MODAL DE ERRO------------------....
<f:subview id= "modalErrorAssUser" >
<a4j:include viewId= "modalError.xhtml" />
</f:subview>
<f:subview id= "modal" >
<a4j:include viewId= "modalEditUserColetor.xhtml" />
</f:subview>
<ui:include src= "/pesquisas/pesqPessoa.xhtml" >
<ui:param name= "beanObserver" value= "#{pesquisaPessoaMB}" />
</ui:include>
</ui:define>
</ui:composition>