Paginação com rich:datascroller dentro de um modalpanel - ERRO

6 respostas
B

Estou tentando criar uma janela modal com uma lista simples. Até ai tudo bem. Porém o datascroller da dataTable não responde aos meus cliques. Se eu colocar essa dataTable fora da modal ela funciona. Alguém sabe o que estou fazendo de errado. Estou usando a versão 3.1.6 GA do RichFaces.

Vejamos o Código:

<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="x"%>
<%@ taglib prefix="fck" uri="http://www.fck-faces.org/fck-faces"%>


<html>
	<head>
		<title>Teste</title>
	</head>
	<body>
		<f:view>
 

			<h:form id="teste"  >

						
								<h:commandLink style="align=left" onclick="Richfaces.showModalPanel('pesquisa_pessoa'); return false;">
									<x:graphicImage value="/imagens/botoes/arvore.gif" alt="Janela Modal" border="2" />
								</h:commandLink>
	 
			</h:form>


			<f:subview id="svPesquisaPessoa">

				<rich:modalPanel id="pesquisa_pessoa" style="overflow:auto;" width="800" height="600">

					<f:facet name="header">
						<h:panelGroup>
							<h:outputText value="Cadastro / Pesquisa Pessoa"></h:outputText>
						</h:panelGroup>
					</f:facet>
					
					<f:facet name="controls">
						<h:panelGroup>
							<h:graphicImage value="/imagens/close.png" style="cursor:pointer" id="hidelink_11" />
							<rich:componentControl for="pesquisa_pessoa" attachTo="hidelink_11" operation="hide" event="onclick" />
						</h:panelGroup>
					</f:facet>

					<a4j:form id="frmWizard">
						<a4j:outputPanel>

							<x:htmlTag value="fieldset">
								<x:htmlTag value="legend">
									<h:outputText value="Pesquisa de pessoa" styleClass="label" />
								</x:htmlTag>


									<a4j:commandButton value="Pesquisar" action="#{CtrlPeticionar.pesquisar}" reRender="recursosListagem, recursoScroller" />
									

								</x:htmlTag>

							</x:htmlTag>
							
							<rich:dataTable width="100%" id="recursosListagem" rows="2" columnClasses="textoNormal" value="#{CtrlPeticionar.pesquisaPessoaPI.resultadoPesquisa}" var="recurso">
								<f:facet name="header">
									<rich:columnGroup>
										<h:column>
											<h:outputText styleClass="headerText" value="Nome" />
										</h:column>

									</rich:columnGroup>
								</f:facet>

								<h:column>
									<h:outputText value="#{recurso.nome}" />
								</h:column>
			
							</rich:dataTable>


							

							<rich:datascroller id="recursoScroller" for="recursosListagem" boundaryControls="hide" stepControls="hide" fastControls="hide">
							</rich:datascroller>
						</a4j:outputPanel>
					</a4j:form>


				</rich:modalPanel>

			</f:subview>

		</f:view>
	</body>
</html>

Alguma ajuda??? Obrigado Pessoal!

6 Respostas

B

Resolvi tirar a bendita tabela da Modal.

felipempantoja

Tenta re-renderizar o dataController dentro dele próprio:

<rich:datascroller id=“recursoScroller” reRender=“recursoScroller” />

B

Não funcionou.

D

usa assim:

<rich:dataTable id="tabela">
...
<f:facet name="footer">
<rich:datascroller align="center" for="tabela" id="scroll" maxPages="20"></rich:datascroller>
</f:facet>
</rich:dataTable>

Não tem erro amigão :smiley:

[]'s

B

Funcionou, na verdade o erro era que não havia setado os ids para todos os campos de entrada assim como não havia usado uma tag de abertura e fechamento.

JotaJota

Eu estava com este problema a muito tempo

agora entendi o porque nao funcionava
vlw obrigado!

Criado 11 de julho de 2008
Ultima resposta 23 de set. de 2008
Respostas 6
Participantes 4