Um AJ4:REPEAT dentro de outro nao funciona?

3 respostas
E

Pessoal é o seguinte estou usando jsf (1.2, 1.1) e rich faces (3.2 , 3.1.5) e tenho uma necessidade de utilizar um a4j:repeat dentro do outro. Mas infelizmente ele so renderiza o que o que esta no primeiro. Alguém saberia informar alguma solucao ou work around pra isso funcionar. Testei nas versões acima, achei uns post's no google dizendo ter um bug que supostamente foi corrigido em 2006. Enfim conto com a ajuda de vcs. Obrigado

view
<%@ 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" %>
<f:view>
<f:loadBundle basename="br.com.nero.bundle.messages" var="msg"/>
<html>
<head>
<title>TITULO</title>
</head>
<body>

	<h:form>
		<a4j:repeat value="#{bean.lista}"  var="item">
			<h:outputText value="#{item.titulo}"></h:outputText><br/>
			<a4j:repeat  value="#{item.listaInterna}"  var="listaIterna">
				<h:outputText value="#{listaInterna.nome}"></h:outputText><br/>
				<br/>
			</a4j:repeat>
		</a4j:repeat>
	</h:form>

</body>
</html>
</f:view>
MB
package demo;

import java.util.ArrayList;
import java.util.HashMap;

public class Bean {
	private String text; 
	
	private ArrayList<HashMap<String, Object>> lista = new ArrayList<HashMap<String, Object>>();
	
	public ArrayList<HashMap<String, Object>> getLista() {
		ArrayList<HashMap<String, Object>> listaInterna = new ArrayList<HashMap<String,Object>>();
		
		HashMap<String, Object> mapa = new HashMap<String, Object>();
		mapa.put("nome", "Nome 1");
		
		HashMap<String, Object> mapa1 = new HashMap<String, Object>();
		mapa1.put("nome", "Nome 2");
		
		listaInterna.add(mapa);
		listaInterna.add(mapa1);
		
		HashMap<String, Object> map = new HashMap<String, Object>();
		map.put("titulo", "Titulo");
		map.put("listaInterna", listaInterna);
		
		lista.add(map);
		return lista;
	}
	public void setLista(ArrayList<HashMap<String, Object>> lista) {
		this.lista = lista;
	}

	public Bean() {
	} 
//continua

SAIDA

TITULO

3 Respostas

E

Galera pra resolver o meu problema fiz umas mudancas na tela e usei jstl mesmo. c:foreach.
Depois com tempo dou uma olhada com calma. Qualquer mudanca posto aqui.
Obrigado

javax.skol

Se lhe interessar, use o repeat do facelets
ui:repeat

E

Valeu psyltrance!
Mas eu testei tbm o repeat do facelets mas se comporta da mesma forma que o a4j:repeat.
Obrigado

Criado 29 de agosto de 2008
Ultima resposta 1 de set. de 2008
Respostas 3
Participantes 2