Hi,
When I do a #call:, a continuation is created and then the new component is added to the sender via decorations to render instead of the sender. During the #call: a render notification is raised and then the component is rendered on a stream and sent back to the browser in a response. When I call #answer: later it will restore the continuation and the old stack is restored. When the component is rendered, does this render on the same stream that was used before? When I do a #call: in an Ajax callback, I also create a continuation, send a notification to stop the callback and then render something on the response-stream so that the new component is displayed. However, once the #answer: is sent and the continuation is continued i cannot write anything to the old stream as the old stream is no longer there. Same goes for the new stream, that one was part of the old stack that called #answer:, which is discarded when the continuation restores. Is there a way to have a valid stream after the continuation is reset and be able to respond to the browser? Kind Regards Karsten -- Karsten Kusche - Dipl.Inf. - [hidden email] Tel: +49 3496 21 43 29 Georg Heeg eK - Köthen Handelsregister: Amtsgericht Dortmund A 12812 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> When I call #answer: later it will restore the continuation and the old
> stack is restored. When the component is rendered, does this render on the > same stream that was used before? No, that's a new request. And a new response stream. > When I do a #call: in an Ajax callback, I also create a continuation, send > a notification to stop the callback and then render something on the > response-stream so that the new component is displayed. However, once the > #answer: is sent and the continuation is continued i cannot write anything > to the old stream as the old stream is no longer there. Same goes for the > new stream, that one was part of the old stack that called #answer:, which > is discarded when the continuation restores. You can't. Things are not setup to do #call: or #answer: during AJAX callbacks. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Karsten Kusche
On Thu, Sep 18, 2008 at 6:35 PM, Karsten <[hidden email]> wrote:
> Hi, > > When I do a #call:, a continuation is created and then the new component is > added to the sender via decorations to render instead of the sender. During > the #call: a render notification is raised and then the component is > rendered on a stream and sent back to the browser in a response. Sounds right. > When I call #answer: later it will restore the continuation and the old > stack is restored. When the component is rendered, does this render on the > same stream that was used before? No. A new process is forked in the session and the stack is thus only restored back as far as that point. The response is always for the current request. > When I do a #call: in an Ajax callback, I also create a continuation, send a > notification to stop the callback and then render something on the > response-stream so that the new component is displayed. However, once the > #answer: is sent and the continuation is continued i cannot write anything > to the old stream as the old stream is no longer there. Same goes for the > new stream, that one was part of the old stack that called #answer:, which > is discarded when the continuation restores. > > Is there a way to have a valid stream after the continuation is reset and be > able to respond to the browser? Well, you can't call #call: or #answer: in the rendering phase, and you can't render in the action phase. If you're trying to #call: and then render in the same method (after the #call: returns) something is wrong. I think the problem is that the AJAX callbacks don't do the normal 2-phase action/render sequence - you just receive a request and return a response (it's more of an event-processing mechanism from the server's point of view). I'm not sure that calling from an AJAX callback makes sense. Julian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
"Julian Fitzell" <[hidden email]> wrote in message
> I think the problem is that the AJAX callbacks don't do the normal > 2-phase action/render sequence I have struggled to understand why. Is there a (simple explanation of the) reason? I understand that to Seaside it is just an event to process. But to me, the application programmer, why should it not appear as (a) execute my callback, change domain model, components, etc. (b) render incremental update on a provided canvas ? Is there a reason this is inappropriate? Thanks - Sophie _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> I have struggled to understand why. Is there a (simple explanation of the)
> reason? I understand that to Seaside it is just an event to process. But to > me, the application programmer, why should it not appear as > > (a) execute my callback, change domain model, components, etc. > (b) render incremental update on a provided canvas There is no such "incremental update" model in Seaside. Seaside cannot automatically figure out what components changed, and even if it could, Seaside cannot address the affected DOM elements. > Is there a reason this is inappropriate? Seaside was designed for plain HTTP, not AJAX. You can easily build such a model on top of Seaside though. I have, and several other people, did such things. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Julian Fitzell-2
Hi Julian,
> No. A new process is forked in the session and the stack is thus only > restored back as far as that point. The response is always for the > current request. > thx, i'll have a closer look at this! > Well, you can't call #call: or #answer: in the rendering phase, and > you can't render in the action phase. If you're trying to #call: and > then render in the same method (after the #call: returns) something is > wrong. > right. However, in seaBreeze you don't have a rendering phase and still the developer has code executed in an ajax-callback. I don't really see why he should care if this code is executed via ajax or via a standard callback, that's why i try to fix this problem. The "only" thing that doesn't work here is the continuation thing. Without continuation the new component is show and on answer the old component is back in place. But with the continuation in place, so that the #call: can return a value from the called component, there's no way to write back to the server.... > I think the problem is that the AJAX callbacks don't do the normal > 2-phase action/render sequence - you just receive a request and return > a response (it's more of an event-processing mechanism from the > server's point of view). I'm not sure that calling from an AJAX > callback makes sense. > > Imagine some sort of form that only updates its error area and once all inputs are correct, the callback doesn't update the errors anymore but instead calls the next component or simply answers back to the previous component. Kind Regards Karsten -- Karsten Kusche - Dipl.Inf. - [hidden email] Tel: +49 3496 21 43 29 Georg Heeg eK - Köthen Handelsregister: Amtsgericht Dortmund A 12812 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Julian Fitzell-2
Thanks a lot for this comment Julian, > I think the problem is that the AJAX callbacks don't do the normal > 2-phase action/render sequence - you just receive a request and return > a response (it's more of an event-processing mechanism from the > server's point of view). I'm not sure that calling from an AJAX > callback makes sense. > After the #answer: is done and the code is finished, I tell the current session to redirect to an empty block, which then follows the normal Seaside process and renders the new page again. Kind Regards Karsten -- Karsten Kusche - Dipl.Inf. - [hidden email] Tel: +49 3496 21 43 29 Georg Heeg eK - Köthen Handelsregister: Amtsgericht Dortmund A 12812 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hello All,
My name is Agnaldo de Oliveira, i am from Brasil. I need read a gzip stream sended by java app and return a gzip stream for that. I don't undertant how i can do this. this is my first study in seaside. tankyou. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2008/9/19 agnaldo4j <[hidden email]>:
> Hello All, > > My name is Agnaldo de Oliveira, i am from Brasil. > > I need read a gzip stream sended by java app and return a gzip stream for > that. Hi Could you provide a bit more context? You want to do what? GZip is used for what? What Smalltalk dialect do you use? Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
"Lukas Renggli" <[hidden email]> wrote in message
>> to me, the application programmer, why should it not appear as >> >> (a) execute my callback, change domain model, components, etc. >> (b) render incremental update on a provided canvas > > There is no such "incremental update" model in Seaside. Seaside cannot > automatically figure out what components changed, and even if it > could, Seaside cannot address the affected DOM elements. Ah, ok. I was actually more curious if [seaside + scriptaculous + ... ] _should_ move closer to such a model, to more fully embrace an Ajax-y applications. Thanks ... Sophie _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
Sorry, my english is very limited.
I use seaside with squeak 3.9. I have a desktop application developed in java, this desktop application send a gzip stream to server(seaside) and receive from the server a gzip stream. I need understand how can i receive a gzip stream in seaside request, unzip this, execute persistence and then zip the response to send for java desktop application. 2008/9/19 agnaldo4j [hidden email]:Hello All, My name is Agnaldo de Oliveira, i am from Brasil. I need read a gzip stream sended by java app and return a gzip stream for that.Hi Could you provide a bit more context? You want to do what? GZip is used for what? What Smalltalk dialect do you use? Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2008/9/19 agnaldo4j <[hidden email]>:
> Sorry, my english is very limited. > > I use seaside with squeak 3.9. > I have a desktop application developed in java, this desktop application > send a gzip stream to server(seaside) and receive from the server a gzip > stream. This doesn't sound very Seaside specific. Seaside only works over http(s), it's a web framework. It looks more like you need a generic Squeak/Smalltalk server. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall
<[hidden email]> wrote: > 2008/9/19 agnaldo4j <[hidden email]>: >> Sorry, my english is very limited. >> >> I use seaside with squeak 3.9. >> I have a desktop application developed in java, this desktop application >> send a gzip stream to server(seaside) and receive from the server a gzip >> stream. > > This doesn't sound very Seaside specific. Seaside only works over > http(s), it's a web framework. It looks more like you need a generic > Squeak/Smalltalk server. I'm not certain but is the question just about using GZIP content compression for the HTTP stream? Julian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Correct Julian, is this.On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall [hidden email] wrote:2008/9/19 agnaldo4j [hidden email]:Sorry, my english is very limited. I use seaside with squeak 3.9. I have a desktop application developed in java, this desktop application send a gzip stream to server(seaside) and receive from the server a gzip stream.This doesn't sound very Seaside specific. Seaside only works over http(s), it's a web framework. It looks more like you need a generic Squeak/Smalltalk server.I'm not certain but is the question just about using GZIP content compression for the HTTP stream? Julian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside My request and response are in gzip mode, but in seside i don't undarstand how todo this. A example in Ruby on Rails: class TesteController < ApplicationController protect_from_forgery :except => [:teste] require 'zlib' def teste gz = Zlib::GzipReader.new(request.body) puts gz.read render :json => {:nome => "Agnaldo de Oliveira"}.to_json StringIO.open('', 'w') do |strio| gw = Zlib::GzipWriter.new(strio) gw.write(response.body) response.body = strio.string gw.close() end end end _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Sat, Sep 20, 2008 at 5:18 PM, agnaldo4j <[hidden email]> wrote:
> Julian Fitzell escreveu: > > On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall > <[hidden email]> wrote: > > > 2008/9/19 agnaldo4j <[hidden email]>: > > > Sorry, my english is very limited. > > I use seaside with squeak 3.9. > I have a desktop application developed in java, this desktop application > send a gzip stream to server(seaside) and receive from the server a gzip > stream. > > > This doesn't sound very Seaside specific. Seaside only works over > http(s), it's a web framework. It looks more like you need a generic > Squeak/Smalltalk server. > > > I'm not certain but is the question just about using GZIP content > compression for the HTTP stream? > > Correct Julian, is this. > My request and response are in gzip mode, but in seside i don't undarstand > how todo this. > A example in Ruby on Rails: > class TesteController < ApplicationController > protect_from_forgery :except => [:teste] > > require 'zlib' > > def teste > gz = Zlib::GzipReader.new(request.body) > puts gz.read > > render :json => {:nome => "Agnaldo de Oliveira"}.to_json > > StringIO.open('', 'w') do |strio| > gw = Zlib::GzipWriter.new(strio) > gw.write(response.body) > response.body = strio.string > gw.close() > end > end > end I'm not certain but I imagine you could configure Apache to do this in front of Seaside. Maybe Comanche or Swazoo even support it? I'm not sure... maybe somebody else on the list knows. Julian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Is it possible to have more than one button on a form, and to decide
which button is going to respond to the Enter key? Does it always have to be the first button? -Carl Gundel http://www.libertybasic.com http://www.runbasic.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
You can specify default action for "enter" key on any form,
(html form) defaultAction: [self next]; with: [self renderFormOn: html]. -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Carl Gundel Sent: September 24, 2008 11:57 AM To: Seaside - general discussion Subject: [Seaside] Multiple buttons and the Enter key Is it possible to have more than one button on a form, and to decide which button is going to respond to the Enter key? Does it always have to be the first button? -Carl Gundel http://www.libertybasic.com http://www.runbasic.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by agnaldo4j
2008/9/20 agnaldo4j <[hidden email]>:
> Julian Fitzell escreveu: > > On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall > <[hidden email]> wrote: > > > 2008/9/19 agnaldo4j <[hidden email]>: > > > Sorry, my english is very limited. > > I use seaside with squeak 3.9. > I have a desktop application developed in java, this desktop application > send a gzip stream to server(seaside) and receive from the server a gzip > stream. > > > This doesn't sound very Seaside specific. Seaside only works over > http(s), it's a web framework. It looks more like you need a generic > Squeak/Smalltalk server. > > > I'm not certain but is the question just about using GZIP content > compression for the HTTP stream? > > Julian > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > Correct Julian, is this. > My request and response are in gzip mode, but in seside i don't undarstand > how todo this. > A example in Ruby on Rails: > class TesteController < ApplicationController > protect_from_forgery :except => [:teste] > > require 'zlib' > > def teste > gz = Zlib::GzipReader.new(request.body) > puts gz.read > > render :json => {:nome => "Agnaldo de Oliveira"}.to_json > > StringIO.open('', 'w') do |strio| > gw = Zlib::GzipWriter.new(strio) > gw.write(response.body) > response.body = strio.string > gw.close() > end > end > end Sorry for not replying earlier. You can zip and unzip strings by sending #zipped or #unzipped to them. To make that work in every case you probably have to hack it into WAKom/Encoded or configure Apache (see Julian's post). Your post raises some other questions however, most importantly how does the Java application interact with Seaside? E.g when and why does it connect to Seaside? Why does the Java application use gzip? Is there a way to turn it off in the Java application? Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Philippe Marschall escreveu:
Hello Philippe,2008/9/20 agnaldo4j [hidden email]:Julian Fitzell escreveu: On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall [hidden email] wrote: 2008/9/19 agnaldo4j [hidden email]: Sorry, my english is very limited. I use seaside with squeak 3.9. I have a desktop application developed in java, this desktop application send a gzip stream to server(seaside) and receive from the server a gzip stream. This doesn't sound very Seaside specific. Seaside only works over http(s), it's a web framework. It looks more like you need a generic Squeak/Smalltalk server. I'm not certain but is the question just about using GZIP content compression for the HTTP stream? Julian _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside Correct Julian, is this. My request and response are in gzip mode, but in seside i don't undarstand how todo this. A example in Ruby on Rails: class TesteController < ApplicationController protect_from_forgery :except => [:teste] require 'zlib' def teste gz = Zlib::GzipReader.new(request.body) puts gz.read render :json => {:nome => "Agnaldo de Oliveira"}.to_json StringIO.open('', 'w') do |strio| gw = Zlib::GzipWriter.new(strio) gw.write(response.body) response.body = strio.string gw.close() end end endSorry for not replying earlier. You can zip and unzip strings by sending #zipped or #unzipped to them. To make that work in every case you probably have to hack it into WAKom/Encoded or configure Apache (see Julian's post). Your post raises some other questions however, most importantly how does the Java application interact with Seaside? E.g when and why does it connect to Seaside? Why does the Java application use gzip? Is there a way to turn it off in the Java application? Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside The java application send a gzip stream to server for reduce the size of json message. the message is large(4 mb), and the response is large to. With this i reduce time delay. You wrote: "You can zip and unzip strings by sending #zipped or #unzipped to them.", but i don't know how get this zipped stream by request. Thank you. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
2008/9/24 agnaldo4j <[hidden email]>:
> Philippe Marschall escreveu: > > 2008/9/20 agnaldo4j <[hidden email]>: > > > Julian Fitzell escreveu: > > On Sat, Sep 20, 2008 at 3:25 PM, Philippe Marschall > <[hidden email]> wrote: > > > 2008/9/19 agnaldo4j <[hidden email]>: > > > Sorry, my english is very limited. > > I use seaside with squeak 3.9. > I have a desktop application developed in java, this desktop application > send a gzip stream to server(seaside) and receive from the server a gzip > stream. > > > This doesn't sound very Seaside specific. Seaside only works over > http(s), it's a web framework. It looks more like you need a generic > Squeak/Smalltalk server. > > > I'm not certain but is the question just about using GZIP content > compression for the HTTP stream? > > Julian > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > Correct Julian, is this. > My request and response are in gzip mode, but in seside i don't undarstand > how todo this. > A example in Ruby on Rails: > class TesteController < ApplicationController > protect_from_forgery :except => [:teste] > > require 'zlib' > > def teste > gz = Zlib::GzipReader.new(request.body) > puts gz.read > > render :json => {:nome => "Agnaldo de Oliveira"}.to_json > > StringIO.open('', 'w') do |strio| > gw = Zlib::GzipWriter.new(strio) > gw.write(response.body) > response.body = strio.string > gw.close() > end > end > end > > > Sorry for not replying earlier. You can zip and unzip strings by > sending #zipped or #unzipped to them. To make that work in every case > you probably have to hack it into WAKom/Encoded or configure Apache > (see Julian's post). > > Your post raises some other questions however, most importantly how > does the Java application interact with Seaside? E.g when and why does > it connect to Seaside? Why does the Java application use gzip? Is > there a way to turn it off in the Java application? > > Cheers > Philippe > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > Hello Philippe, > > The java application send a gzip stream to server for reduce the size of > json message. > the message is large(4 mb), and the response is large to. > With this i reduce time delay. If you interact over JSON you probably don't need all the component (and session and callback and backtrack) functionality of Seaside and want to write a WARequestHandler or use a different web framework at all. > You wrote: "You can zip and unzip strings by sending #zipped or #unzipped > to them.", but i don't know how get this zipped stream by request. Something along the lines of: self session curretRequest rawPostFields unzipped Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |