The "flush" attribute is not evaluated at all. It is never used in any of the tags that define it.
JSP pages not being flushed with <tiles:insertAttribute ... flush="true"/> request
Not entirely understanding what the desired fix here.
But this patch makes flush="true" work as each Tag documents it to.
That is with flush="true" the following code
is called before any of the Tags do anything.
The patch is perfect, thanks! I will apply it ASAP.
Sorry, I did not notice that you flush the buffer before rendering.
The flush must be done after calling "end" methods.
i only followed the documentation which says :
... If <code>true</code>, current page out stream is flushed before insertion.
Sometimes I have to read the documentation... :-D
You're right, but also the documentation is wrong, I don't know what I was thinking at the time :-D
See how it worked in Tiles 2.1.x:
Can you patch the documentation too, please?
sure thing. flush after insertion, and documentation accordingly.
Ok that's fantastic :-D
Curious as I am, I've taken a look at how Tiles 1 worked:
In fact in Tiles 1 the flush is used to flush before the item is inserted. I don't know why, I don't think it is useful at all, why should one flush before something is inserted?
However, I think that your final patch is OK, I will apply it ASAP. Thank you!
> I don't know why, I don't think it is useful at all, why should one flush before something is inserted?
It doesn't make sense to me either.
You have no idea what currently is in the buffer, but
I'm sorry I don't remember the specifics, but I remember helping someone with a specific bug in Struts-Tiles a long time ago where this was an issue. Seems like I was helping with a ticket where somebody was trying to insert a bunch of nested tiles and the flush (or lack of flush) was causing them to render in the wrong order or something. I'll see if there's any chance I can find the ticket.
Do you mean TILES-192? It's already connected as a referenced issue.
Applied patch by Mck SembWever.
Fixed some JSP docs, and added the flush attribute in <tiles:getAsString>
@Antonio, no it was way older than that. The issue is probably somewhere in the Struts project. The reporter posted a small webapp that had a crazy recursive tile insert thing going on IIRC.