2 Replies Latest reply: Nov 29, 2008 11:46 AM by Martin Sznapka RSS

ajaxSingle in repeat bug

Martin Sznapka Newbie

Hello
I want to report a bug with ajaxSingle inside repeat, here is the code:

<a4j:commandLink action="#{hello.increaseCounter}" reRender="ajaxOutputPanel" ajaxSingle="true">firstlink</a4j:commandLink>
<ui:repeat value="#{hello.list}" var="item">
 <a4j:commandLink action="#{hello.increaseCounter}" reRender="ajaxOutputPanel" ajaxSingle="true">link#{item}</a4j:commandLink>
</ui:repeat>

<a4j:outputPanel id="ajaxOutputPanel">
 #{hello.counter}
</a4j:outputPanel>


@Name("hello")
@Scope(ScopeType.APPLICATION)
@Startup
public class Hello {

 private List<Integer> list;
 private int counter;

 @Create
 public void create() {
 list = Arrays.asList(2,3);
 counter = 0;
 }

 public void increaseCounter() {
 counter++;
 }

 public List<Integer> getList() {
 return list;
 }

 public int getCounter() {
 return counter;
 }

}


If you are clicking on the first link, than everything works. if you are clicking on the links inside repeat, than it is not working as expected.

If this example runs on richfaces 3.1.X, than everything work correctly. On the other hand, richfaces 3.2.X have the bug described above.

You can try example .