Community
Participate
Working Groups
Created attachment 200088 [details] example for shell To reproduce apply attached patch and run controls demo. The client will probably crash without the necessary changes, but we are only interested in the response message anyway. You will notice that a "create"-operation is written, but not the "set" for text.
I think the reason for this is in the way an instance of ClientObject is re-used. The first time an instance is requested via ClientObjectFactory#getForWidget(), the ClientObject is created and its contructor will call JavaScriptResponseWriter#getProtocolWriter(), which creates an instance of ProtocolMessageWriter and stores it in JavaScriptResponseWriter#protocolWriter. Now some other (non-protocol) stuff is rendered, which will causes JavaScriptResponseWriter#writePendingProtocolMessage to be called. The ProtocolMessageWriter instance will be used to write the pending operation to the JavaScriptResponseWriter, and the protocolWriter field is set back to null. The next time ClientObjectFactory#getForWidget() is called (for the same widget), it will re-use the old ClientObject instance which a) still contains the already written operations, b) will not store an instance of ProtocolMessageWriter in JavaScriptResponseWriter#protocolWriter, as this is only done in its contructor.
Fixed in CVS HEAD.