[Seaside] size limit with onInput: and jQuery callback:value:

bobn at rogers.com bobn at rogers.com
Sun Mar 13 15:40:14 UTC 2016

Adding type: 'POST' did indeed fix the problem, in both the Pharo image, and in VW + HA Proxy. Interesting that VW without HA Proxy worked fine (made for some fun diagnostics).
Much thanks,Bob 

    On Sunday, March 13, 2016 5:02 AM, Johan Brichau <johan at inceptive.be> wrote:

 Hi Bob,
Have you tried setting the ajax request to type POST instead of the (standard) GET?
 onInput: ( html jQuery ajax  type: ‘POST’; callback: [:stringValue | self enteredText: stringValue] value: html jQuery this value);
Web servers (and proxies) often set a maximum url length. Since a GET request encodes both the Seaside callback number and the entered text into the url, it will most probably be truncated by the web server.In most cases I observed, it was only the entered text that was truncated, but depending on the position of the parameters, it may also truncate the Seaside callback number. As a result, the callback will not be invoked.
I did not try your example, so if this is not the case, ping me back and I will take a closer look.
Also: I often ask myself why people copy/paste entire documents in textareas :))
Hope it helpsJohan

On 12 Mar 2016, at 16:03, bobn at rogers.com wrote:
Hello,We're seeing a problem where entering large text into a textArea causes the component to no longer be responsive. In our case, using VW 7.10.1, the problem only happens if we're using a reverse proxy (either HA Proxy or Apache). To debug the problem, I set up a development VW image running Seaside on port 7771 and HA Proxy on another server, redirecting port 80 to 7771. I then connected two sessions: one directly to the Seaside image, and one by way of the HA Proxy server. The directly connected session works fine, no limit on entered text that I can see. HA Proxy session has problems if the text entered is around 3500 (the exact number varies). 
Cincom suggested putting a break into SiouX.NetHttpResponder>>createRequestFrom: which shows that jQuery callback from onInput is not being sent.
So, to isolate the problem (and get some help on this forum), I coded an example in a new Pharo 4.0 image, with Seaside 3.1. This example, however, has the same symptom as my VW + HA Proxy configuration: once the entered text is past around 3500, the onInput ajax callback no longer responds. I'm hoping someone can shed some light on this problem... I have some unhappy users. 
renderContentOn: html
 html heading: 'Text Editor'. html textArea style: 'width: 820px; height: 200px; ';  value: self enteredText; onInput: ( html jQuery ajax  callback: [:stringValue | self enteredText: stringValue] value: html jQuery this value); onBlur: ( (html jQuery id: 'displayedText') load html: [:renderer |  self renderEnteredTextOn: renderer]). html horizontalRule. self renderEnteredTextOn: html.

renderEnteredTextOn: html
 html div id: 'displayedText'; with: [  html big: 'size: ', self enteredText size printString; break. html text: self enteredText]

Bob NemecHTS_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160313/3dfeaef7/attachment-0001.htm

More information about the seaside mailing list