O que há de errado

3 respostas
marlonmca

O código abaixo está normal exceto pelo fato de que não renderiza o modal.

O que tem de errado?

<ui:composition
	xmlns:a4j="http://richfaces.org/a4j">
	
		<h:commandButton 
                	action="#{home.persist()}"
                 	value="Anexar" 
                 	styleClass="dr-tbpnl-tb-inact"
              		rendered="true">
        	<a4j:support event="onclick" reRender="panelRecibo" />
        </h:commandButton>
	    <br/>

 		<rich:modalPanel id="panelRecibo" width="420" height="200" >
			<f:facet name="header">Requisitar Nova Senha</f:facet>			
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/closeMP.gif"
						onclick="Richfaces.hideModalPanel('panelTeste')"/>
				</h:panelGroup>
			</f:facet>			
			<h:form id="gerarSenha">
				<div id="receberNovaSenha">			
					<rich:panel	style="width:400px;">
						<f:facet name="header">Dados</f:facet>
						<h:outputLabel for="login"
							style="margin-right:18px; font-weight: bold">Login</h:outputLabel>
						<h:inputText id="login" value="#{usuarioHome.login}" required="true" />
						<br />
						<br />
						<h:outputLabel for="email"
							style="margin-right:18px; font-weight: bold">Email</h:outputLabel>
						<h:inputText id="email" value="#{usuarioHome.email}" required="true" />
					</rich:panel>
		
		            <h:commandButton id="confirma" value="Confirma"
						styleClass="buttons dr-tbpnl-tb-inact"
						style="width: 150px !important"
						action="#{usuarioHome.requisitarNovaSenha()}" /> 
				
					<input class="buttons dr-tbpnl-tb-inact" id="btnTrocarSenha2" 
					    type="button" value="Cancelar" 
					    style="width: 150px !important"
						onclick="Richfaces.hideModalPanel('panelTeste')" />
				</div>
			</h:form>
		</rich:modalPanel>
            
	</ui:composition>

3 Respostas

phmjunior

onde está a função q chama esse cara aqui?

Richfaces.hideModalPanel(‘panelTeste’)

marlonmca

O panelRecibo é chamado dentro do <h:commandButton>(a4j:suppot).

Eu resolvi assim para chamar o modalPanel:

<h:commandButton
				id="botaoAnexarDocumento" 
               	action="#{home.persist()}"
               	value="Anexar" 
               	styleClass="dr-tbpnl-tb-inact"
     			rendered="true"/>


		<rich:modalPanel id="panelRecibo" width="690" height="500" >
			<f:facet name="header">#{util.contextPath}</f:facet>			
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/img/closeMP.gif"
						onclick="Richfaces.hideModalPanel('panelRecibo')"/>
				</h:panelGroup>
			</f:facet>		
			<iframe src="report.seam" width="100%" height="95%" /> 	
		</rich:modalPanel>

		<script type="text/javascript">
	       valorTrue = #{home.getIsTrue()};	           
	       if(valorTrue){
		      if(confirm('Deseja imprimir o Recibo?')){ 
	    	  	Richfaces.showModalPanel('panelRecibo');
		      }
	    	  home.setIsTrue(false);
		   }
	    </script>

Acrescentei o JavaScript para chamar o modalPanel.

phmjunior

blz entaum marlonmca ,

eu não via a função e pensei q fosse a ausencia dela a causa do problema entaum blz mesmo

qualquer coisa estamos ai

Criado 19 de outubro de 2009
Ultima resposta 21 de out. de 2009
Respostas 3
Participantes 2