a4j:repeat not working
jmiguel77 Apr 25, 2007 6:37 PMHi:
I am using a4j in a project. I am trying to dinamically build a list of entries using a4j:repeater but i dont seem to be able to make it work
This is my jsp:
<a4j:form id="headForm" ajaxSubmit="true">
 <div id="infoBarContainer">
 <div id="infoBarContent">
 <h:outputLabel value="#{msg['common.company']}:" styleClass="normal" />
 <a4j:commandLink id="companyCommandLink" value="#{userDataManager.compania.nombre}" action="#{headManager.commandAction}" reRender="selectDataList" />
 <br />
 <h:outputLabel value="#{msg['common.agency']}:" styleClass="normal" />
 <a4j:commandLink id="agencyCommandLink" value="#{userDataManager.usuarioCentro.agencia.nombre}" action="#{headManager.commandAction}" reRender="selectDataList" />
 </div>
 <div style="float: left; width: 300px; overflow-y: auto; overflow-x: hidden;">
 <a4j:repeat id="selectDataList" binding="#{headManager.selectDataList}" value="#{headManager.valueList}" var="item" ajaxKeys="#{headManager.keys}">
 <h:outputText value="#{item.value}"/>
 </a4j:repeat>
 </div>
 </a4j:form>
And this is the backing bean that supports the page (the relevant code): public class HeadBackingBean {
 private List<KeyValueBean> valueList;
 private UIRepeat selectDataList;
 private Set<Integer> keys = null;
 public String commandAction() {
 String username = getUserDataManager().getUsuario().getUsuario();
 List<CompaniaUsuarioCentroDTO> companyList = companyService.getCompaniaByUsername(username);
 if (companyList != null && companyList.size() > 0) {
 HashSet<Integer> ajaxKeys = new HashSet<Integer>();
 setValueList(new ArrayList<KeyValueBean>());
 int index = 0;
 for(CompaniaUsuarioCentroDTO item : companyList) {
 getValueList().add(new KeyValueBean(item.getCompania().getNoCia(), item.getCompania().getNombre()));
 System.out.println("data >>> " + item.getCompania().getNoCia() + " >>> " + item.getCompania().getNombre());
 ajaxKeys.add(index);
 System.out.println("index >>> " + index);
 index++;
 }
 setKeys(ajaxKeys);
 }
 return null;
 }
The commandAction method is executing ok, no errors appear in the server log, or in the javascript of the page; but the a4j:repeat is not refreshed
I think it should be working but ia am really new to Jboss a4j - richFaces so, i could really use some help
Thanks a lot
 
     
     
    