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?
Asked
Active
Viewed 23 times
0

Socrates
- 8,724
- 25
- 66
- 113
1 Answers
0
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.

Makhiel
- 3,874
- 1
- 15
- 21
-
Hey Makhiel! Thanks for your reply. Sure, the problem can be solved with CSS, true. But it's basically a workaround. Is there no way to tell `a4j:repeat` to handle the iteration objects separately so that the repeat iteration becomes invisible? Are there other loops I could use? – Socrates Oct 14 '14 at 12:44
-
No, on the server side the repeat (and everything else) is an element, it only disappears on the client side. Moreso during the build, the repeat only has one child, it is expanded later. – Makhiel Oct 14 '14 at 12:59