It appears that if the interceptor service calls processState during an inception point, then the buffer gets cleared at that point in the code. Buffer append calls that occur afterwards render correctly.
Could these be similar buffer clearing issues with renderView()? I have other code which is exhibiting the same behavior. The major difference I notice is that this other code renders views and returns the results as a string to the buffer to append. I can try to provide a simple example if it helps.
Yes, I believe this is the case.
The buffer is shared across all states. So it reuses the buffer object.
I guess maybe a better approach is to create a new buffer on a per state basis? Thoughts?
I would expect each state to get its own buffer.
I had that feeling, too, . Since a buffer object is passed as an argument for each interception point, my belief is that, if I wanted to continue to manipulate that buffer in other code (like models), I would have to pass the buffer to that code.
What repercussions would a per-state buffer have over the current single-state buffer?
One caveat, you MUST use the passed in buffer object, not the buffer methods in the interceptor