Search code examples
javajbossrichfaceswildflywildfly-8

a4j:repeat changes behaviour?


I have a strange effect with a4j:repeat when using rich:toolbar in RichFaces. In my little example I just place a couple of icons on the toolbar. If I do it manually, they are all separately placed into <td>...</td>. But if let them generate by a list using a4j:repeat, they will all be placed together within one <td>...</td>. The result of this is that those placed manually are more far from each other in the view. Those who were generated, stick together. I believe the difference is, that the rich:toolbarGroup thinks of the a4j:repeat as one object, and of the manually placed ones as serveral objects. I tried out with c:forEach as well, but I get exactly the same effect. Does anyone know how to define the a4j:repeat objects as separate? Or if it is another problem, how to solve it?


Solution

  • If you're only worried about the spacing you can increase it by CSS.

    <a4j:repeat> is not a good thing to use with the toolbar. If the icons you put in are supposed to have some sort of functionality attached to them you'd have a problem assigning it dynamically.