From stormbyte at gmail.com Mon Mar 2 08:33:40 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Mon Mar 2 08:34:00 2015 Subject: [Seaside] How to register a WADispatcher derivate? Message-ID: I learnt how to register new application under default dispatcher or unders specified one with WAAdmin>>register:at: and its derivated functions. But now, I subclassed WADispatcher and I want to register it for later using to add root components to it programatically. It can be done via web config so I guess it can also be done programatically, but have no idea. Any hint? Thanks. From stephan at stack.nl Mon Mar 2 09:11:56 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Mar 2 09:12:08 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? In-Reply-To: References: Message-ID: On 02/03/15 09:33, David Carlos Manuelda wrote: > I learnt how to register new application under default dispatcher or unders > specified one with WAAdmin>>register:at: and its derivated functions. > > But now, I subclassed WADispatcher and I want to register it for later using > to add root components to it programatically. > > It can be done via web config so I guess it can also be done > programatically, but have no idea. In QCMagritte, we do the following to make it easy to have production and development versions - production has no development tools - production sets itself as default application (assumes one application/image) - development sets the debugger error handler QCApplication class>>registerForProductionAt: anApplicationName | application | application := self registerAt: anApplicationName. WAAdmin disableDevelopmentTools. WAAdmin defaultDispatcher defaultName: anApplicationName. ^application QCApplication class>>registerForDevelopmentAt: anApplicationName | application | WAAdmin enableDevelopmentTools. application := self registerAt: anApplicationName. application filter configuration at: #exceptionHandler put: WADebugErrorHandler. (self overridesDefaults includes: WAAdmin defaultDispatcher defaultName) ifTrue: [ WAAdmin defaultDispatcher defaultName: anApplicationName ]. ^application QCApplication class>>registerAt: anApplicationName ^(WAAdmin register: self asApplicationAt: anApplicationName) preferenceAt: #sessionClass put: self sessionClass; addLibrary: JQDeploymentLibrary; addLibrary: JQUiDeploymentLibrary; yourself With overridesDefault we determine which application gets to be default when loading multiple applications that all want to be default. There are several groups in the QCMagritte configuration, and when you load the tutorial, that should override the demo as default. QCTutorialApplication>>overridesDefaults ^#( 'browse' 'welcome' 'QCMagritte Demo' ) QCApplication class>>overridesDefaults ^#( 'browse' 'welcome' ) You can find a QCMagritte image at https://ci.inria.fr/pharo-contribution/job/QCMagritte/ Stephan From stephan at stack.nl Mon Mar 2 09:19:26 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Mar 2 09:19:38 2015 Subject: [Seaside] Re: Seaside 3.1 vs Seaside 3.0.10 - no seaside walkback anymore? In-Reply-To: <6C1833B6-EF52-48D6-9834-E30F4A470A6A@nordakademie.de> References: <6C1833B6-EF52-48D6-9834-E30F4A470A6A@nordakademie.de> Message-ID: On 28/02/15 12:53, Johannes Brauer wrote: > Especially I do miss the debug link. Is it possible the get in in > Seaside 3.1? Sure. Just set the error handler to the WADebugErrorHandler, either form the config, or do something similar to: QCApplication class>>registerForDevelopmentAt: anApplicationName | application | WAAdmin enableDevelopmentTools. application := self registerAt: anApplicationName. application filter configuration at: #exceptionHandler put: WADebugErrorHandler. (self overridesDefaults includes: WAAdmin defaultDispatcher defaultName) ifTrue: [ WAAdmin defaultDispatcher defaultName: anApplicationName ]. ^application QCApplication class>>registerAt: anApplicationName ^(WAAdmin register: self asApplicationAt: anApplicationName) preferenceAt: #sessionClass put: self sessionClass; addLibrary: JQDeploymentLibrary; addLibrary: JQUiDeploymentLibrary; yourself Stephan From stormbyte at gmail.com Mon Mar 2 11:25:36 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Mon Mar 2 11:25:47 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? References: Message-ID: Stephan Eggermont wrote: > On 02/03/15 09:33, David Carlos Manuelda wrote: >> I learnt how to register new application under default dispatcher or >> unders specified one with WAAdmin>>register:at: and its derivated >> functions. >> >> But now, I subclassed WADispatcher and I want to register it for later >> using to add root components to it programatically. >> >> It can be done via web config so I guess it can also be done >> programatically, but have no idea. > > In QCMagritte, we do the following to make it easy to have > production and development versions > - production has no development tools > - production sets itself as default application (assumes one > application/image) > - development sets the debugger error handler > > QCApplication class>>registerForProductionAt: anApplicationName > | application | > application := self registerAt: anApplicationName. > WAAdmin disableDevelopmentTools. > WAAdmin defaultDispatcher defaultName: anApplicationName. > ^application > > QCApplication class>>registerForDevelopmentAt: anApplicationName > | application | > WAAdmin enableDevelopmentTools. > application := self registerAt: anApplicationName. > application filter configuration at: #exceptionHandler put: > WADebugErrorHandler. > (self overridesDefaults includes: WAAdmin defaultDispatcher defaultName) > ifTrue: [ WAAdmin defaultDispatcher defaultName: anApplicationName ]. > ^application > > QCApplication class>>registerAt: anApplicationName > ^(WAAdmin register: self asApplicationAt: anApplicationName) > preferenceAt: #sessionClass put: self sessionClass; > addLibrary: JQDeploymentLibrary; > addLibrary: JQUiDeploymentLibrary; > yourself > > With overridesDefault we determine which application gets to be > default when loading multiple applications that all want to > be default. There are several groups in the QCMagritte configuration, > and when you load the tutorial, that should override the demo as > default. > > QCTutorialApplication>>overridesDefaults > ^#( 'browse' 'welcome' 'QCMagritte Demo' ) > > QCApplication class>>overridesDefaults > ^#( 'browse' 'welcome' ) > > You can find a QCMagritte image at > https://ci.inria.fr/pharo-contribution/job/QCMagritte/ > > Stephan Yes, I have something like this to handle development/deployment stuff. >From your code it is not clear for me how is the dispatcher registered, I only see application registration/modification using the default dispatcher. But what about adding my own dispatcher? Like you can do via config panel in localhost:8080/config -> add .-> type (Dispatcher) I need dispatchers, for example, to have /something_here/ as a dispatcher (not an application) so I can handle it, have its subapplications, and so programatically. So what I would need is something like register:at: but instead of applications, a dispatcher. ATM, I only know how to create a dispatcher, and manage it, add/remove applications, debuggers and so, but nothing about telling seaside to actually use my dispatcher on a given entry point as string :( From stephan at stack.nl Mon Mar 2 11:46:14 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Mar 2 11:46:29 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? In-Reply-To: References: Message-ID: On 02/03/15 12:25, David Carlos Manuelda wrote: > So what I would need is something like register:at: but instead of > applications, a dispatcher. > > ATM, I only know how to create a dispatcher, and manage it, add/remove > applications, debuggers and so, but nothing about telling seaside to > actually use my dispatcher on a given entry point as string :( > I think I misunderstood you. What are you actually trying to achieve? Subclassing WADispatcher is not often needed/the right thing to do. Stephan From stormbyte at gmail.com Mon Mar 2 12:38:42 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Mon Mar 2 12:39:00 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? References: Message-ID: Stephan Eggermont wrote: > On 02/03/15 12:25, David Carlos Manuelda wrote: >> So what I would need is something like register:at: but instead of >> applications, a dispatcher. >> >> ATM, I only know how to create a dispatcher, and manage it, add/remove >> applications, debuggers and so, but nothing about telling seaside to >> actually use my dispatcher on a given entry point as string :( >> > > I think I misunderstood you. What are you actually trying to achieve? > Subclassing WADispatcher is not often needed/the right thing to do. > > Stephan I noticed that if I do WAAdmin register: aComponent at: '/en/SomePoint' it creates the 'en' dispatcher for me, and after, registers the application aComponent inside that dispatcher. This is more or less what I want, except that I want to have functionality added to that dispatcher (for example the language variable set). Also, to be cleaner, if I unregister the application, only "SomePoint" gets unregistered, while its dispatcher remains, which is not so clean. That is why I am thinking of subclassing the WADispatcher, so I can add the functionality, and still control how it registers/unregisters with its children content programatically. From stormbyte at gmail.com Mon Mar 2 15:06:42 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Mon Mar 2 15:06:55 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? References: Message-ID: Playing around with it, I found how to do it like this: |waa| waa:=MyWADispatcher new defaultName: 'es'. "Do aditional configuration on waa instance (...)" WADispatcher default handlers at: ( waa defaultName ) put: waa. That will add my dispatcher to the list (I can verify it in localhost:8080/config ), is that the way to go, or should be it more simple? From stephan at stack.nl Mon Mar 2 15:20:00 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Mar 2 15:20:19 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? In-Reply-To: References: Message-ID: On 02/03/15 13:38, David Carlos Manuelda wrote: > I noticed that if I do WAAdmin register: aComponent at: '/en/SomePoint' it > creates the 'en' dispatcher for me, and after, registers the application > aComponent inside that dispatcher. > > This is more or less what I want, except that I want to have functionality > added to that dispatcher (for example the language variable set). Do you want to encode the language in the url? Why? Stephan From stormbyte at gmail.com Mon Mar 2 16:16:37 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Mon Mar 2 16:16:48 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? References: Message-ID: Stephan Eggermont wrote: > On 02/03/15 13:38, David Carlos Manuelda wrote: >> I noticed that if I do WAAdmin register: aComponent at: '/en/SomePoint' >> it creates the 'en' dispatcher for me, and after, registers the >> application aComponent inside that dispatcher. >> >> This is more or less what I want, except that I want to have >> functionality added to that dispatcher (for example the language variable >> set). > > Do you want to encode the language in the url? Why? > > Stephan Encoding the language in the url like /en/foo /es/foo is a better thing to do for SEO for example than having session side initializated. URLs are very important in this matter, also, it is better to understand a bookmarkable url like /en/forum than /forum?_k=2345234523452 or /forum?lang=en (just an example). Note that not in all languages forum is the same word, example in spanish is foro, so it make sense. From laura.risani at gmail.com Mon Mar 2 16:23:53 2015 From: laura.risani at gmail.com (Laura Risani) Date: Mon Mar 2 16:23:55 2015 Subject: [Seaside] Anchor appearance when script attached In-Reply-To: <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> Message-ID: Seems that same anchor-like rendering by web browsers can be achieved with url:'#' (instead of url:?javascript:{}? ). On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau wrote: > Laura, > > > I had tried adding "callback:[]" but that renders the whole page again. > > That?s to be expected. > I just wanted to make clear that if you do not add a callback, you need to > set a url (href attribute) yourself or the browser will not show it as a > (clickable) link. > > Johan_______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150302/385768cf/attachment.htm From laura.risani at gmail.com Mon Mar 2 16:47:22 2015 From: laura.risani at gmail.com (Laura Risani) Date: Mon Mar 2 16:47:25 2015 Subject: [Seaside] Re: Listening to a comet app In-Reply-To: References: <1424906135731-4807728.post@n4.nabble.com> Message-ID: Found the solution, if anyone faces the same problem. The method String >> unescapePercentsWithTextEncoding: you get from Seaside reads ---------- self deprecated: '#unescapePercentsWithTextEncoding: has been replaced with ZnPercentEncoder' on: '20131027' in: '3.0' ---------- Just replace all with ---------- ^ ZnPercentEncoder new encode: self -------- and WAListenerAdaptor will work fine and Comet examples will run ok. Love, Laura On Sat, Feb 28, 2015 at 3:59 PM, Laura Risani wrote: > Hi, > Thank you Philippe and Paul for your answers. > > I'm just trying to build my first rather simple Seaside app based on DWDWS > book, so i'd rather use Comet, for future use i'll consider WebSockets. > > I've been trying to run some of the examples at package Comet-Examples , > but i couldn't put up a streaming server adaptor. I've tried with WAListenerAdaptor > and ZnZincStreamingServerAdaptor. > > In the case of WAListenerAdaptor ... > WAListenerAdaptor sends a msg to HttpRequest who in turn sends > String>>#unescapePercentsWithTextEncoding: which leads to a predebug > window saying > 'The method String>>unescapePercentsWithTextEncoding: has been deprecated. > #unescapePercentsWithTextEncoding: has been replaced with ZnPercentEncoder' > > In the case of ZnZincStreamingServerAdaptor... > An error 'Improper store into indexable object' is risen coming from aWAComboResponse > sending > aZdcSocketStream nextPut: $ > > In both cases i started the adaptors sending to the respective class > #startOn:portInteger. I'm using Pharo v3. > I have loaded Comet , and just in case, Zinc and Kom , sending > ConfigurationOfSeaside3 project stableVersion load:versionString. > > Love, > Laura > > > > On Thu, Feb 26, 2015 at 5:57 PM, Philippe Marschall < > philippe.marschall@gmail.com> wrote: > >> On Thu, Feb 26, 2015 at 12:15 AM, Paul DeBruicker >> wrote: >> > Because you're in pharo 3 it may be best to use Zinc and look into what >> Sven >> > says in this thread >> >> AFAIK the Seaside Comet support never has been ported to Zinc (it's a >> bit problematic since it wants to drive the listen loop). Zinc does >> support WebSockets natively though. >> >> > >> http://forum.world.st/Seaside-3-0-on-Pharo-2-0-Zinc-and-comet-td4680272.html#a4680378 >> > >> > >> > The Seaside book probably needs instructions to non-Comanche server >> > adaptors. >> >> The supported interface is the same on all adaptors. You just need to >> load a different group from Metacello. >> >> Cheers >> Philippe >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150302/bd77eb24/attachment.htm From brauer at nordakademie.de Mon Mar 2 18:47:05 2015 From: brauer at nordakademie.de (Johannes Brauer) Date: Mon Mar 2 18:47:11 2015 Subject: [Seaside] Seaside 3.1 vs Seaside 3.0.10 - no seaside walkback anymore? In-Reply-To: References: <6C1833B6-EF52-48D6-9834-E30F4A470A6A@nordakademie.de> Message-ID: thanks, Stephan > Am 02.03.2015 um 10:19 schrieb Stephan Eggermont : > > On 28/02/15 12:53, Johannes Brauer wrote: > >> Especially I do miss the debug link. Is it possible the get in in >> Seaside 3.1? > > Sure. Just set the error handler to the WADebugErrorHandler, > either form the config, or do something similar to: > > QCApplication class>>registerForDevelopmentAt: anApplicationName > | application | > WAAdmin enableDevelopmentTools. > application := self registerAt: anApplicationName. > application filter configuration at: #exceptionHandler put: WADebugErrorHandler. > (self overridesDefaults includes: WAAdmin defaultDispatcher defaultName) > ifTrue: [ WAAdmin defaultDispatcher defaultName: anApplicationName ]. > ^application > > QCApplication class>>registerAt: anApplicationName > ^(WAAdmin register: self asApplicationAt: anApplicationName) > preferenceAt: #sessionClass put: self sessionClass; > addLibrary: JQDeploymentLibrary; > addLibrary: JQUiDeploymentLibrary; > yourself > > Stephan > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ________________________________ Staatlich anerkannte private Fachhochschule NORDAKADEMIE Gemeinn?tzige Aktiengesellschaft K?llner Chaussee 11 25337 Elmshorn Vorstand: Prof. Dr. Georg Plate (Vorsitzender), Dipl.-Ing. J?rg Meier (stellv. Vorstand) Vorsitzender des Aufsichtsrats: Dr. h.c. Hans-Heinrich Bruns Sitz: Elmshorn, Amtsgericht Pinneberg, HRB 1682 From johan at inceptive.be Mon Mar 2 19:43:13 2015 From: johan at inceptive.be (Johan Brichau) Date: Mon Mar 2 19:43:18 2015 Subject: [Seaside] Anchor appearance when script attached In-Reply-To: References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> Message-ID: <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> Laura, That will make your page scroll to the top. Not always desirable? Johan > On 02 Mar 2015, at 17:23, Laura Risani wrote: > > Seems that same anchor-like rendering by web browsers can be achieved with url:'#' (instead of url:?javascript:{}? ). > > On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau > wrote: > Laura, > > > I had tried adding "callback:[]" but that renders the whole page again. > > That?s to be expected. > I just wanted to make clear that if you do not add a callback, you need to set a url (href attribute) yourself or the browser will not show it as a (clickable) link. > > Johan_______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150302/d4fe3602/attachment-0001.htm From stephan at stack.nl Mon Mar 2 20:26:13 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Mon Mar 2 20:26:29 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? In-Reply-To: References: Message-ID: On 02/03/15 17:16, David Carlos Manuelda wrote: > Encoding the language in the url like /en/foo /es/foo is a better thing to > do for SEO for example than having session side initializated. What are your considerations for choosing to override WADispatcher, vs one of the other WARequestHandler subclasses (i.e. WAApplication)? Stephan From sergio.rrd at gmail.com Mon Mar 2 21:06:36 2015 From: sergio.rrd at gmail.com (sergio_101) Date: Mon Mar 2 21:06:40 2015 Subject: [Seaside] Re: Concurrent Programming References: <03CF1C69-5159-4966-8B5E-560683924243@flowingconcept.com> <1425092373221-4808473.post@n4.nabble.com> <1425092666965-4808475.post@n4.nabble.com> <54F21AB2.7080305@comcast.net> Message-ID: hey, bob.. i think this might be the approach i need with the second part of my app.. going to give this a go later this evening.. thanks! On Sat, Feb 28, 2015 at 2:44 PM Bob Arning wrote: > Here's something you might consider. In this case, I render a page and > then start gathering data to fill it. The "action" script gets fired when > the page loads and then fires again every time "tinyThing" is clicked. > > > renderMiningOn: html > | action myLoops buildFinished currData prevData | > > LOOPER := OrderedCollection new. > myLoops := 0. > miningPriceSelector ifNil: [miningPriceSelector := 2]. > self renderMiningPriceSelectorOn: html. > prevData := currData := nil. > buildFinished := false. > html div id: 'incompleteTable001'; with: []. > [ > self buildMiningData: [ :data :flag | > prevData := currData. > currData := data. > buildFinished := flag. > ]. > ] forkAt: Processor activePriority. > > action := html jQuery ajax > script: [ :s | > myLoops := myLoops + 1. > myLoops > 100 ifTrue: [self halt]. > [currData == prevData & buildFinished not] whileTrue: [ > (Delay forMilliseconds: 300) wait > ]. > currData ifNotNil: [ > s << (s jQuery: #incompleteTable001) html: [ :h | > self renderMiningFrom: currData on: h > ]. > ]. > buildFinished ifTrue: [ > s << ((s jQuery: #moretocome) html: [ :h | h text: > 'done']). > ] ifFalse: [ > s << ((s jQuery: #moretocome) html: [ :h | h text: '...']). > s << ((s jQuery: #tinyThing) trigger: 'click'). > ] > ]. > html div id: 'moretocome'; with: []. > html div > id: 'tinyThing'; > onClick: action; > with: []. > html document addLoadScript: action > > > On 2/28/15 2:01 PM, sergio_101 wrote: > > ahhh.. i need to get this info for processing into my image.. it will not > be passed into the browser until much later in the game. the reason i want > to do it this way is so that all this stuff is happening without the user > having to wait on it.. > > i will take a look at threadpool and futures.. > > thanks! > > > On Fri, Feb 27, 2015 at 10:12 PM Paul DeBruicker > wrote: > >> Oh, and futures: >> >> http://onsmalltalk.com/smalltalk-concurrency-playing-with-futures >> >> >> You probably want Futures if you're gonna poll from the client. >> >> >> >> >> >> >> Paul DeBruicker wrote >> > Hmmmm. >> > >> > In your plain English example is what you want happening in the client >> > browser or in your smalltalk image, ideally? >> > >> > >> > If you want the friends data in your image then you should consider >> using >> > Ramon Leon's ThreadPool: >> > http://onsmalltalk.com/2010-07-28-a-simple-thread-pool-for-smalltalk . >> > I've kept it working here: >> http://smalltalkhub.com/#!/~pdebruic/ThreadPool >> > You could use it to get the friends data from Facebook into the image. >> > Then poll for results from the client to update any divs/views. You can >> > queue the thread pool requests in your login callback before you even >> > begin rendering things. >> > >> > >> > >> > If you just want to load the friends into a div only in the client its >> > probably easier to write a JS function in an external file and call it >> > from Seaside using the info specific to the user. e.g. >> > >> > html div >> > id:'friendList' >> > script: ((html jQuery id: 'friendList') call: 'loadFriendList' with: >> > self userFacebookID). >> > >> > >> > >> > Look at the JSScript class for the definition of #<< . It just >> > concatenates the scripts. The #script: method passes a stream into the >> > block, and the << writes whatever you've written onto that stream. >> Check >> > the senders and implementors to get your bearings. >> > >> > >> > When you have time please send things like: >> > >> > "I think this code "____code example_____" should do "____expected >> > behavior____" but instead it does "____jumbly voodoo_____" instead. What >> > don't I understand? >> > >> > >> > Hope this helps. >> > >> > >> > Paul >> > >> > sergio_101 wrote >> >> i think i am having alot of difficulty understanding out to phrase ajax >> >> and >> >> jquery calls in seaside.. everywhere else, i use jquery etc >> >> unobtrusively.. >> >> so i don't leave the javacript world when i write javascript. i just >> >> can't >> >> seem to find anything that makes sense on how to do something as simple >> >> as >> >> this using pure seaside/smalltalk. >> >> >> >> i can't really even understand what the "<<" in: >> >> script: [ :s | s << (s jQuery: #logger) html: DateAndTime now >> >> ]); >> >> does.. >> >> >> >> in plain english, i would like to do this: >> >> >> >> - when the page loads, call the url as an ajax function >> >> - set the variable -> currentUser friendsList: (from the above) >> >> >> >> but i am not understanding how to even code this.. >> >> >> >> thanks! >> >> >> >> >> >> >> >> >> >> >> >> On Fri, Feb 27, 2015 at 3:27 PM Sebastian Sastre < >> >> >> sebastian@ >> >> >>> wrote: >> >> >> >>> why the fork that way? >> >>> >> >>> I?d think more into make it a normal render page that has a little >> piece >> >>> of javascript that will do an ajax hit to a server callback to do >> >>> whatever >> >>> you want, no? >> >>> >> >>> >> >>> >> >>> >> >>> > On Feb 27, 2015, at 1:45 PM, sergio_101 < >> >> >> sergio.rrd@ >> >> >> > wrote: >> >>> > >> >>> > i am currently writing a facebook application in seaside. one of the >> >>> most important pieces of data i need to retrieve is the user's friends >> >>> list. unfortunately, this could end up being a substantial amount of >> >>> data. >> >>> fortunately, the load time for this data is not horrible, just a few >> >>> seconds. >> >>> > i am making the assumption that while interacting with my app, the >> >>> user >> >>> will not be adding new friends mid stream, and that during each >> session, >> >>> the friends list will be static. >> >>> > >> >>> > what i would like to do is make this happen completely behind the >> >>> scenes, so that when the user logs in, the request for the friends >> list >> >>> is >> >>> fired off RIGHT AFTER the page is rendered. >> >>> > i read the section on concurrency in 'deep into pharo', and while >> >>> incomplete, it makes enough sense for me to try it. >> >>> > my question is.. i am going to do something like: >> >>> > >> >>> > [currentUser updateData] fork >> >>> > >> >>> > 1. if i want to do that RIGHT AFTER rendering, can i put that at the >> >>> end >> >>> of renderContentOn: html ? >> >>> > 2. when i want to work with the data, how would i know if it was >> done >> >>> updating? i was thinking of using a semaphore.. but how would i let >> the >> >>> next process know to keep waiting until the process was done? i would >> >>> want >> >>> to do something like: getFriendsList (but make sure process that >> >>> populates >> >>> it is done before running the request). >> >>> > >> >>> > thanks! >> >>> > _______________________________________________ >> >>> > seaside mailing list >> >>> > >> >> >> seaside@.squeakfoundation >> >> >>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >>> >> >>> _______________________________________________ >> >>> seaside mailing list >> >>> >> >> >> seaside@.squeakfoundation >> >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >>> >> >> >> >> _______________________________________________ >> >> seaside mailing list >> >> >> seaside@.squeakfoundation >> >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Concurrent-Programming-tp4808376p4808475.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > _______________________________________________ > seaside mailing listseaside@lists.squeakfoundation.orghttp://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150302/3d74050c/attachment-0001.htm From laura.risani at gmail.com Mon Mar 2 21:13:46 2015 From: laura.risani at gmail.com (Laura Risani) Date: Mon Mar 2 21:13:48 2015 Subject: [Seaside] Anchor appearance when script attached In-Reply-To: <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> Message-ID: Hi Johan. I thought for a moment it would do something else... I'll stick then with url:?javascript:{}? Best, Laura On Mon, Mar 2, 2015 at 4:43 PM, Johan Brichau wrote: > Laura, > > That will make your page scroll to the top. > Not always desirable? > > Johan > > On 02 Mar 2015, at 17:23, Laura Risani wrote: > > Seems that same anchor-like rendering by web browsers can be achieved with > url:'#' (instead of url:?javascript:{}? ). > > On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau wrote: > >> Laura, >> >> > I had tried adding "callback:[]" but that renders the whole page again. >> >> That?s to be expected. >> I just wanted to make clear that if you do not add a callback, you need >> to set a url (href attribute) yourself or the browser will not show it as a >> (clickable) link. >> >> Johan_______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150302/37597453/attachment.htm From laura.risani at gmail.com Mon Mar 2 23:37:54 2015 From: laura.risani at gmail.com (Laura Risani) Date: Mon Mar 2 23:37:55 2015 Subject: [Seaside] Anchor appearance when script attached In-Reply-To: References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> Message-ID: I'm facing a problem with this code that we mentioned html anchor url:?javascript:{}?; onClick: aScript; onKeyDown:aScript the problem is that when pressing enter key (while the anchor has focus) triggers onKeyDown: (and variants) twice, while pressing any other key just does it (as desired) once. Is there a way to override this undesired behavior of enter key? On Mon, Mar 2, 2015 at 6:13 PM, Laura Risani wrote: > Hi Johan. I thought for a moment it would do something else... > I'll stick then with url:?javascript:{}? > Best, > Laura > > On Mon, Mar 2, 2015 at 4:43 PM, Johan Brichau wrote: > >> Laura, >> >> That will make your page scroll to the top. >> Not always desirable? >> >> Johan >> >> On 02 Mar 2015, at 17:23, Laura Risani wrote: >> >> Seems that same anchor-like rendering by web browsers can be achieved >> with url:'#' (instead of url:?javascript:{}? ). >> >> On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau >> wrote: >> >>> Laura, >>> >>> > I had tried adding "callback:[]" but that renders the whole page again. >>> >>> That?s to be expected. >>> I just wanted to make clear that if you do not add a callback, you need >>> to set a url (href attribute) yourself or the browser will not show it as a >>> (clickable) link. >>> >>> Johan_______________________________________________ >>> seaside mailing list >>> seaside@lists.squeakfoundation.org >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150302/acc35805/attachment.htm From stormbyte at gmail.com Tue Mar 3 08:40:03 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Tue Mar 3 08:40:42 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? References: Message-ID: Stephan Eggermont wrote: > On 02/03/15 17:16, David Carlos Manuelda wrote: >> Encoding the language in the url like /en/foo /es/foo is a better thing >> to do for SEO for example than having session side initializated. > > What are your considerations for choosing to override WADispatcher, > vs one of the other WARequestHandler subclasses (i.e. WAApplication)? > > Stephan My idea is to process any request under /xx/* in the same app regardless of the language (same logic). I register a testing app under /es/test and I realized seaside adds a dispatcher automatically for me, that is why I thought it could be the way to go. But I am starting to see why you said it may not be a good idea, inside dispatcher I can't seem to configure things like gettext, which I can in an application. In theory it would be possible to register an WAApplication subclass instancein language entry point, like /es and let it handle all the requests, like /es/foo or /es/bar to decide which component(s) to render? From stephan at stack.nl Tue Mar 3 10:12:46 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Tue Mar 3 10:13:01 2015 Subject: [Seaside] Re: How to register a WADispatcher derivate? In-Reply-To: References: Message-ID: On 03/03/15 09:40, David Carlos Manuelda wrote: > But I am starting to see why you said it may not be a good idea, inside > dispatcher I can't seem to configure things like gettext, which I can in an > application. > > In theory it would be possible to register an WAApplication subclass > instance in language entry point, like /es and let it handle all the > requests, like /es/foo or /es/bar to decide which component(s) to render? That would be the place where I would start looking, yes. I've never had to do SEO optimization, it was less relevant for complex/internal applications. Please keep us posted. Stephan From maarten.mostert at wanadoo.fr Tue Mar 3 12:34:00 2015 From: maarten.mostert at wanadoo.fr (Maarten Mostert) Date: Tue Mar 3 12:34:06 2015 Subject: [Seaside] Appex: Cross-Origin Resource Sharing policy Message-ID: <7DB776B7-8546-433F-A645-501A9BBAB6A5@wanadoo.fr> Hi, I use the fontello font (MIT license) with Appex that I declare in the following way within my CSS headers. headBootStrapCCS ^< !-- Font Awesome CSS --> " rel="stylesheet"> For the Fontello font (MIT license) I cannot find a CDN provider. However this gives the following CROS warnings within Chrome?s developer window. https://www.dropbox.com/s/bfsn6176qvfj9wl/2015-03-03_11-38-08.png?dl=0 Any hint is welcome. Regards, @+Maarten -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150303/fb52d1de/attachment.htm From stormbyte at gmail.com Tue Mar 3 16:59:46 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Tue Mar 3 17:01:52 2015 Subject: [Seaside] Hardcoded WAApplication class name in WAAdmin>>register:asApplicationAt:in: Message-ID: The mentioned function in subject is a very good handler about programatically registering components in seaside. But I found that, in line 4 (of code snippet 1 at bottom), the class WAApplication is hardcoded so it makes duplicated and non needed work if you subclass WAApplication and want to still use it to register components. For example, I can subclass WAApplication (named for example MyWAApplication) and WAAdmin (named MyWAAdmin) to handle my own stuff. But since it is hardcoded into its WAAdmin parent method, the child method is a copy/paste of the original one, just changing the application class name, which is double and unneeded work in my opinion. That being said, I have a proposal: In the same way, WAAdmin has class side methods like "defaultDispatcher", I propose a method like WAAdmin class>>defaultApplicationClass ^ WAApplication That way, subclassing WAApplication is as simple as subclassing WAAdmin with only changing the method defaultApplicationClass to be returning the class you want to use, so with the above, the change proposal is at code snippet 2 below. (Code snippet 1) WAAdmin class>>register: aComponentClass asApplicationAt: aString in: aDispatcher "Use this to programmatically register a component as an application." | application | application := self register: WAApplication at: aString in: aDispatcher. self configureNewApplication: application. application preferenceAt: #rootClass put: aComponentClass. ^ application (Code snippet 2) WAAdmin class>>register: aComponentClass asApplicationAt: aString in: aDispatcher "Use this to programmatically register a component as an application." | application | application := self register: (self defaultApplicationClass) at: aString in: aDispatcher. self configureNewApplication: application. application preferenceAt: #rootClass put: aComponentClass. ^ application From pdebruic at gmail.com Tue Mar 3 17:17:32 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Tue Mar 3 17:25:51 2015 Subject: [Seaside] Re: Appex: Cross-Origin Resource Sharing policy In-Reply-To: <7DB776B7-8546-433F-A645-501A9BBAB6A5@wanadoo.fr> References: <7DB776B7-8546-433F-A645-501A9BBAB6A5@wanadoo.fr> Message-ID: <1425403052090-4809268.post@n4.nabble.com> See https://en.wikipedia.org/wiki/Cross-origin_resource_sharing. You need to add a response header to your application, either in the image or if you're using apache or nginx at the webserver level to explicitly allow the fonts you want to load to be loaded. Fonts and Javascript are restricted because they can do Nasty Things. so in your image: html requestContext response headerAt: 'Access-Control-Allow-Origin' put: 'http://example.com' Maarten Mostert-2 wrote > Hi, > > I use the fontello font (MIT license) with Appex that I declare in the > following way within my CSS headers. > > headBootStrapCCS > > > ^< > > !-- Font Awesome CSS --> > <link > href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css > <http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css>" > rel="stylesheet"> > > > > " rel="stylesheet"> > > > For the Fontello font (MIT license) I cannot find a CDN provider. > > However this gives the following CROS warnings within Chrome?s developer > window. > > https://www.dropbox.com/s/bfsn6176qvfj9wl/2015-03-03_11-38-08.png?dl=0 > <https://www.dropbox.com/s/bfsn6176qvfj9wl/2015-03-03_11-38-08.png?dl=0> > > Any hint is welcome. > > Regards, > > @+Maarten > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Appex-Cross-Origin-Resource-Sharing-policy-tp4809124p4809268.html Sent from the Seaside General mailing list archive at Nabble.com. From laura.risani at gmail.com Wed Mar 4 01:08:39 2015 From: laura.risani at gmail.com (Laura Risani) Date: Wed Mar 4 01:08:41 2015 Subject: [Seaside] Page title and end screen Message-ID: Hi all, Have two quick questions 1) Where can i set the page title that shows on web browser tabs/windows? 2) How can i after manually ending a session, redirect the user to a page with a line msg (like "You have left.") that won't go away until he actively navigates to other page? Best, Laura -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150303/ac2cd3c0/attachment.htm From laura.risani at gmail.com Wed Mar 4 20:56:28 2015 From: laura.risani at gmail.com (Laura Risani) Date: Wed Mar 4 20:56:32 2015 Subject: [Seaside] Anchor appearance when script attached In-Reply-To: References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> Message-ID: Seems that pressing keys space/enter also triggers onClick: . I changed the code to button bePush onClick:aScript and so onClick: is triggered just once whether for click/any keypress. Best, Laura On Mon, Mar 2, 2015 at 8:37 PM, Laura Risani wrote: > I'm facing a problem with this code that we mentioned > html anchor url:?javascript:{}?; onClick: aScript; onKeyDown:aScript > the problem is that when pressing enter key (while the anchor has focus) > triggers onKeyDown: (and variants) twice, while pressing any other key > just does it (as desired) once. > Is there a way to override this undesired behavior of enter key? > > > On Mon, Mar 2, 2015 at 6:13 PM, Laura Risani > wrote: > >> Hi Johan. I thought for a moment it would do something else... >> I'll stick then with url:?javascript:{}? >> Best, >> Laura >> >> On Mon, Mar 2, 2015 at 4:43 PM, Johan Brichau wrote: >> >>> Laura, >>> >>> That will make your page scroll to the top. >>> Not always desirable? >>> >>> Johan >>> >>> On 02 Mar 2015, at 17:23, Laura Risani wrote: >>> >>> Seems that same anchor-like rendering by web browsers can be achieved >>> with url:'#' (instead of url:?javascript:{}? ). >>> >>> On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau >>> wrote: >>> >>>> Laura, >>>> >>>> > I had tried adding "callback:[]" but that renders the whole page >>>> again. >>>> >>>> That?s to be expected. >>>> I just wanted to make clear that if you do not add a callback, you need >>>> to set a url (href attribute) yourself or the browser will not show it as a >>>> (clickable) link. >>>> >>>> Johan_______________________________________________ >>>> seaside mailing list >>>> seaside@lists.squeakfoundation.org >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>>> >>> >>> _______________________________________________ >>> seaside mailing list >>> seaside@lists.squeakfoundation.org >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> >>> >>> >>> _______________________________________________ >>> seaside mailing list >>> seaside@lists.squeakfoundation.org >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150304/92a86955/attachment.htm From pdebruic at gmail.com Wed Mar 4 21:54:07 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Mar 4 22:02:35 2015 Subject: [Seaside] Re: Anchor appearance when script attached In-Reply-To: References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> Message-ID: <1425506047538-4809599.post@n4.nabble.com> I'm not sure but you might could have also just used a 'return false;' at the end of your script to shut off the default behavior. laura wrote > Seems that pressing keys space/enter also triggers onClick: . I changed > the > code to > button bePush onClick:aScript > and so onClick: is triggered just once whether for click/any keypress. > > Best, > Laura > > On Mon, Mar 2, 2015 at 8:37 PM, Laura Risani < > laura.risani@ > > wrote: > >> I'm facing a problem with this code that we mentioned >> html anchor url:?javascript:{}?; onClick: aScript; onKeyDown:aScript >> the problem is that when pressing enter key (while the anchor has focus) >> triggers onKeyDown: (and variants) twice, while pressing any other key >> just does it (as desired) once. >> Is there a way to override this undesired behavior of enter key? >> >> >> On Mon, Mar 2, 2015 at 6:13 PM, Laura Risani < > laura.risani@ > > >> wrote: >> >>> Hi Johan. I thought for a moment it would do something else... >>> I'll stick then with url:?javascript:{}? >>> Best, >>> Laura >>> >>> On Mon, Mar 2, 2015 at 4:43 PM, Johan Brichau < > johan@ > > wrote: >>> >>>> Laura, >>>> >>>> That will make your page scroll to the top. >>>> Not always desirable? >>>> >>>> Johan >>>> >>>> On 02 Mar 2015, at 17:23, Laura Risani < > laura.risani@ > > wrote: >>>> >>>> Seems that same anchor-like rendering by web browsers can be achieved >>>> with url:'#' (instead of url:?javascript:{}? ). >>>> >>>> On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau < > johan@ > > >>>> wrote: >>>> >>>>> Laura, >>>>> >>>>> > I had tried adding "callback:[]" but that renders the whole page >>>>> again. >>>>> >>>>> That?s to be expected. >>>>> I just wanted to make clear that if you do not add a callback, you >>>>> need >>>>> to set a url (href attribute) yourself or the browser will not show it >>>>> as a >>>>> (clickable) link. >>>>> >>>>> Johan_______________________________________________ >>>>> seaside mailing list >>>>> > seaside@.squeakfoundation >>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>>>> >>>> >>>> _______________________________________________ >>>> seaside mailing list >>>> > seaside@.squeakfoundation >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>>> >>>> >>>> >>>> _______________________________________________ >>>> seaside mailing list >>>> > seaside@.squeakfoundation >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>>> >>>> >>> >> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Anchor-appearance-when-script-attached-tp4806275p4809599.html Sent from the Seaside General mailing list archive at Nabble.com. From pdebruic at gmail.com Wed Mar 4 21:55:41 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Mar 4 22:04:06 2015 Subject: [Seaside] Re: Page title and end screen In-Reply-To: References: Message-ID: <1425506141686-4809600.post@n4.nabble.com> 1. MyComponent>>#updateRoot: anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot title: self title 2. MySession>>#signOut self logSignOut. self signedInUser: UserModel new. self unregister. self requestContext redirectTo:self defaultDomain laura wrote > Hi all, > Have two quick questions > 1) Where can i set the page title that shows on web browser tabs/windows? > 2) How can i after manually ending a session, redirect the user to a page > with a line msg (like "You have left.") that won't go away until he > actively navigates to other page? > > Best, > Laura > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Page-title-and-end-screen-tp4809343p4809600.html Sent from the Seaside General mailing list archive at Nabble.com. From laura.risani at gmail.com Thu Mar 5 00:18:11 2015 From: laura.risani at gmail.com (Laura Risani) Date: Thu Mar 5 00:18:14 2015 Subject: [Seaside] Re: Anchor appearance when script attached In-Reply-To: <1425506047538-4809599.post@n4.nabble.com> References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> <1425506047538-4809599.post@n4.nabble.com> Message-ID: Didn't now you can shut down default behavior, interesting. On Wed, Mar 4, 2015 at 6:54 PM, Paul DeBruicker wrote: > I'm not sure but you might could have also just used a 'return false;' at > the > end of your script to shut off the default behavior. > > > > > > > > laura wrote > > Seems that pressing keys space/enter also triggers onClick: . I changed > > the > > code to > > button bePush onClick:aScript > > and so onClick: is triggered just once whether for click/any keypress. > > > > Best, > > Laura > > > > On Mon, Mar 2, 2015 at 8:37 PM, Laura Risani < > > > laura.risani@ > > > > wrote: > > > >> I'm facing a problem with this code that we mentioned > >> html anchor url:?javascript:{}?; onClick: aScript; onKeyDown:aScript > >> the problem is that when pressing enter key (while the anchor has focus) > >> triggers onKeyDown: (and variants) twice, while pressing any other key > >> just does it (as desired) once. > >> Is there a way to override this undesired behavior of enter key? > >> > >> > >> On Mon, Mar 2, 2015 at 6:13 PM, Laura Risani < > > > laura.risani@ > > > > > >> wrote: > >> > >>> Hi Johan. I thought for a moment it would do something else... > >>> I'll stick then with url:?javascript:{}? > >>> Best, > >>> Laura > >>> > >>> On Mon, Mar 2, 2015 at 4:43 PM, Johan Brichau < > > > johan@ > > > > wrote: > >>> > >>>> Laura, > >>>> > >>>> That will make your page scroll to the top. > >>>> Not always desirable? > >>>> > >>>> Johan > >>>> > >>>> On 02 Mar 2015, at 17:23, Laura Risani < > > > laura.risani@ > > > > wrote: > >>>> > >>>> Seems that same anchor-like rendering by web browsers can be achieved > >>>> with url:'#' (instead of url:?javascript:{}? ). > >>>> > >>>> On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau < > > > johan@ > > > > > >>>> wrote: > >>>> > >>>>> Laura, > >>>>> > >>>>> > I had tried adding "callback:[]" but that renders the whole page > >>>>> again. > >>>>> > >>>>> That?s to be expected. > >>>>> I just wanted to make clear that if you do not add a callback, you > >>>>> need > >>>>> to set a url (href attribute) yourself or the browser will not show > it > >>>>> as a > >>>>> (clickable) link. > >>>>> > >>>>> Johan_______________________________________________ > >>>>> seaside mailing list > >>>>> > > > seaside@.squeakfoundation > > >>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >>>>> > >>>> > >>>> _______________________________________________ > >>>> seaside mailing list > >>>> > > > seaside@.squeakfoundation > > >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> seaside mailing list > >>>> > > > seaside@.squeakfoundation > > >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >>>> > >>>> > >>> > >> > > > > _______________________________________________ > > seaside mailing list > > > seaside@.squeakfoundation > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: > http://forum.world.st/Anchor-appearance-when-script-attached-tp4806275p4809599.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150304/7b5c6b53/attachment-0001.htm From laura.risani at gmail.com Thu Mar 5 00:55:19 2015 From: laura.risani at gmail.com (Laura Risani) Date: Thu Mar 5 00:55:21 2015 Subject: [Seaside] Re: Page title and end screen In-Reply-To: <1425506141686-4809600.post@n4.nabble.com> References: <1425506141686-4809600.post@n4.nabble.com> Message-ID: Hi Paul 1. Excellent! 2. What i don't understand of #redirectTo:url , is what url to pass to show just a line of text. Should i instantiate a new component and somehow get its url? Is there some shortcut url to show just a line of text? Best, Laura On Wed, Mar 4, 2015 at 6:55 PM, Paul DeBruicker wrote: > 1. > > MyComponent>>#updateRoot: anHtmlRoot > super updateRoot: anHtmlRoot. > anHtmlRoot title: self title > > > 2. > MySession>>#signOut > self logSignOut. > self signedInUser: UserModel new. > self unregister. > self requestContext redirectTo:self defaultDomain > > > > > > > laura wrote > > Hi all, > > Have two quick questions > > 1) Where can i set the page title that shows on web browser tabs/windows? > > 2) How can i after manually ending a session, redirect the user to a page > > with a line msg (like "You have left.") that won't go away until he > > actively navigates to other page? > > > > Best, > > Laura > > > > _______________________________________________ > > seaside mailing list > > > seaside@.squeakfoundation > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: > http://forum.world.st/Page-title-and-end-screen-tp4809343p4809600.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150304/3b20d2b8/attachment.htm From pdebruic at gmail.com Thu Mar 5 01:13:55 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Thu Mar 5 01:22:22 2015 Subject: [Seaside] Re: Page title and end screen In-Reply-To: References: <1425506141686-4809600.post@n4.nabble.com> Message-ID: <1425518035684-4809624.post@n4.nabble.com> Oh I'm not sure I was thinking about just sending one line, like you asked about. I'd just make a static page that had the 'you have left' messaging and leave it at that. OR use Seaside-REST to show a component at whatever URL you want. What's the value of your use case vs just using a dedicated "Thanks & come back soon" page? To attempt the 'line of text' bit you maybe could just use html anchor url:'javascript:{};' onClick: ((html jQuery expression:'a, button') remove) , ((html jQuery id:'myDiv') load html: [:h |h render: 'you have left']; onComplete: (html jQuery ajax callback:[self signOut])) ; with:'Sign out' Which would remove all the anchors and buttons from the page, load your line into a div, and then run the sign out callback. laura wrote > Hi Paul > 1. Excellent! > 2. What i don't understand of #redirectTo:url , is what url to pass to > show > just a line of text. Should i instantiate a new component and somehow get > its url? Is there some shortcut url to show just a line of text? > Best, > Laura > > On Wed, Mar 4, 2015 at 6:55 PM, Paul DeBruicker < > pdebruic@ > > wrote: > >> 1. >> >> MyComponent>>#updateRoot: anHtmlRoot >> super updateRoot: anHtmlRoot. >> anHtmlRoot title: self title >> >> >> 2. >> MySession>>#signOut >> self logSignOut. >> self signedInUser: UserModel new. >> self unregister. >> self requestContext redirectTo:self defaultDomain >> >> >> >> >> >> >> laura wrote >> > Hi all, >> > Have two quick questions >> > 1) Where can i set the page title that shows on web browser >> tabs/windows? >> > 2) How can i after manually ending a session, redirect the user to a >> page >> > with a line msg (like "You have left.") that won't go away until he >> > actively navigates to other page? >> > >> > Best, >> > Laura >> > >> > _______________________________________________ >> > seaside mailing list >> >> > seaside@.squeakfoundation >> >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Page-title-and-end-screen-tp4809343p4809600.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Page-title-and-end-screen-tp4809343p4809624.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Thu Mar 5 08:16:07 2015 From: johan at inceptive.be (Johan Brichau) Date: Thu Mar 5 08:16:11 2015 Subject: [Seaside] Anchor appearance when script attached In-Reply-To: References: <54E457AF.8060002@objektfabrik.de> <249E7CC5-E997-460E-B92F-087F3E2D6BDB@inceptive.be> <27FE3DC2-683F-4DE4-BD52-1DE2E3F5F9C5@inceptive.be> <1425506047538-4809599.post@n4.nabble.com> Message-ID: <4F220391-826B-4700-A531-C811EC976277@inceptive.be> Mind that that prevents default browser behavior. You can prevent a link from getting keyboard focus by setting a negative tabIndex property: https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex The result is that it will never be able to respond to an enter using it?s click handler. cheers Johan > On 05 Mar 2015, at 01:18, Laura Risani wrote: > > Didn't now you can shut down default behavior, interesting. > > > On Wed, Mar 4, 2015 at 6:54 PM, Paul DeBruicker > wrote: > I'm not sure but you might could have also just used a 'return false;' at the > end of your script to shut off the default behavior. > > > > > > > > laura wrote > > Seems that pressing keys space/enter also triggers onClick: . I changed > > the > > code to > > button bePush onClick:aScript > > and so onClick: is triggered just once whether for click/any keypress. > > > > Best, > > Laura > > > > On Mon, Mar 2, 2015 at 8:37 PM, Laura Risani < > > > laura.risani@ > > > > wrote: > > > >> I'm facing a problem with this code that we mentioned > >> html anchor url:?javascript:{}?; onClick: aScript; onKeyDown:aScript > >> the problem is that when pressing enter key (while the anchor has focus) > >> triggers onKeyDown: (and variants) twice, while pressing any other key > >> just does it (as desired) once. > >> Is there a way to override this undesired behavior of enter key? > >> > >> > >> On Mon, Mar 2, 2015 at 6:13 PM, Laura Risani < > > > laura.risani@ > > > > > >> wrote: > >> > >>> Hi Johan. I thought for a moment it would do something else... > >>> I'll stick then with url:?javascript:{}? > >>> Best, > >>> Laura > >>> > >>> On Mon, Mar 2, 2015 at 4:43 PM, Johan Brichau < > > > johan@ > > > > wrote: > >>> > >>>> Laura, > >>>> > >>>> That will make your page scroll to the top. > >>>> Not always desirable? > >>>> > >>>> Johan > >>>> > >>>> On 02 Mar 2015, at 17:23, Laura Risani < > > > laura.risani@ > > > > wrote: > >>>> > >>>> Seems that same anchor-like rendering by web browsers can be achieved > >>>> with url:'#' (instead of url:?javascript:{}? ). > >>>> > >>>> On Wed, Feb 18, 2015 at 4:17 PM, Johan Brichau < > > > johan@ > > > > > >>>> wrote: > >>>> > >>>>> Laura, > >>>>> > >>>>> > I had tried adding "callback:[]" but that renders the whole page > >>>>> again. > >>>>> > >>>>> That?s to be expected. > >>>>> I just wanted to make clear that if you do not add a callback, you > >>>>> need > >>>>> to set a url (href attribute) yourself or the browser will not show it > >>>>> as a > >>>>> (clickable) link. > >>>>> > >>>>> Johan_______________________________________________ > >>>>> seaside mailing list > >>>>> > > > seaside@.squeakfoundation > > >>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >>>>> > >>>> > >>>> _______________________________________________ > >>>> seaside mailing list > >>>> > > > seaside@.squeakfoundation > > >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> seaside mailing list > >>>> > > > seaside@.squeakfoundation > > >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >>>> > >>>> > >>> > >> > > > > _______________________________________________ > > seaside mailing list > > > seaside@.squeakfoundation > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: http://forum.world.st/Anchor-appearance-when-script-attached-tp4806275p4809599.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150305/d37a37fc/attachment.htm From maarten.mostert at wanadoo.fr Thu Mar 5 16:51:14 2015 From: maarten.mostert at wanadoo.fr (Maarten Mostert) Date: Thu Mar 5 16:51:20 2015 Subject: [Seaside] Re: Appex: Cross-Origin Resource Sharing policy In-Reply-To: <1425403052090-4809268.post@n4.nabble.com> References: <7DB776B7-8546-433F-A645-501A9BBAB6A5@wanadoo.fr> <1425403052090-4809268.post@n4.nabble.com> Message-ID: <8DA865C6-B738-4F87-BEEA-20B634621AD1@wanadoo.fr> Thanks, In affect the following this without problem. http://enable-cors.org/server_apache.html Regards, @+Maarten, > Le 3 mars 2015 ? 18:17, Paul DeBruicker a ?crit : > > See https://en.wikipedia.org/wiki/Cross-origin_resource_sharing. > > > You need to add a response header to your application, either in the image > or if you're using apache or nginx at the webserver level to explicitly > allow the fonts you want to load to be loaded. > > > Fonts and Javascript are restricted because they can do Nasty Things. > > > so in your image: > > html requestContext response headerAt: 'Access-Control-Allow-Origin' put: > 'http://example.com' > > > > > > Maarten Mostert-2 wrote >> Hi, >> >> I use the fontello font (MIT license) with Appex that I declare in the >> following way within my CSS headers. >> >> headBootStrapCCS >> >> >> ^< >> >> !-- Font Awesome CSS --> >> <link >> href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css >> <http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css>" >> rel="stylesheet"> >> > >> >> > >> " rel="stylesheet"> >> >> >> For the Fontello font (MIT license) I cannot find a CDN provider. >> >> However this gives the following CROS warnings within Chrome?s developer >> window. >> >> https://www.dropbox.com/s/bfsn6176qvfj9wl/2015-03-03_11-38-08.png?dl=0 >> <https://www.dropbox.com/s/bfsn6176qvfj9wl/2015-03-03_11-38-08.png?dl=0> >> >> Any hint is welcome. >> >> Regards, >> >> @+Maarten >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: http://forum.world.st/Appex-Cross-Origin-Resource-Sharing-policy-tp4809124p4809268.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150305/dbdf92eb/attachment-0001.htm From Ondrej.Altman at seznam.cz Fri Mar 6 10:17:32 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Fri Mar 6 10:26:13 2015 Subject: [Seaside] Concurrent requests from multiple sessions Message-ID: <1425637052640-4809929.post@n4.nabble.com> Hi all, Currently we are developing a web application in Seaside, and it is necessary for us to work in VAST. The application runs as a Windows service, and for a few days we are facing the following issue: - At one moment there are two users (let's call them 'A' and 'B') logged in in the application, so we have two different sessions. - 'A' requests a page with a long list of objects obtained from DB2, so it takes a number of seconds to get the results. - Less than one second after 'A''s request, 'B' requests another page, for instance an easy static page. - For the time the 'A''s request is handled, the 'B''s browser window freezes and waits for those number of seconds mentioned above. We searched really a lot, but still the results are not what we would expect. This issue makes as confused, because in the future the application should serve hundreds of users with very similar combinations of requests. We didn't know, where our problem lies, so we tried a similar test with a single page with a difficult calculation inside. Then we tried the same in Pharo to exclude the problem in VAST. Both with the same results. Is there anything we are missing? What should we do to achieve a parallel (or kinda better) processing of requests? Thank you very much for your responses. Ondrej -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html Sent from the Seaside General mailing list archive at Nabble.com. From stormbyte at gmail.com Fri Mar 6 10:49:39 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Fri Mar 6 10:50:01 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: wilwarin wrote: > Hi all, > > Currently we are developing a web application in Seaside, and it is > necessary for us to work in VAST. The application runs as a Windows > service, and for a few days we are facing the following issue: > > - At one moment there are two users (let's call them 'A' and 'B') logged > in in the application, so we have two different sessions. > - 'A' requests a page with a long list of objects obtained from DB2, so it > takes a number of seconds to get the results. > - Less than one second after 'A''s request, 'B' requests another page, for > instance an easy static page. > - For the time the 'A''s request is handled, the 'B''s browser window > freezes and waits for those number of seconds mentioned above. > > We searched really a lot, but still the results are not what we would > expect. This issue makes as confused, because in the future the > application should serve hundreds of users with very similar combinations > of requests. > > We didn't know, where our problem lies, so we tried a similar test with a > single page with a difficult calculation inside. Then we tried the same in > Pharo to exclude the problem in VAST. Both with the same results. > > Is there anything we are missing? What should we do to achieve a parallel > (or kinda better) processing of requests? > > Thank you very much for your responses. > > Ondrej > > > > -- > View this message in context: > http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html > Sent from the Seaside General mailing list archive at Nabble.com. Since pharo is green threaded (that means it has only 1 thread in CPU), if you do a very expensive operation it may become unresponsive until it finishes. Try with 9999999999 factorial. and you will see. Due to the previous, even if you do [ 9999999999 factorial ] fork. you will still experiment some kind of lag. Being that said, and also discusses in another thread upon my name, I would suggest you to run several images with a load balancer (nginx for example), my suggestion is to use 1 image per virtual core to achieve the maximum performance possible. That way, when the user expensive operation is taking place, other users may be directed to another image which could be more idle. From stormbyte at gmail.com Fri Mar 6 10:52:01 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Fri Mar 6 10:55:07 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: wilwarin wrote: > because in the future the > application should serve hundreds of users with very similar combinations > of requests. > That sentence also makes me to think that maybe you could also enable database data cache (for example via memcached), so the request response is stored into RAM, and same further requests will take nothing to be done since they are already cached. From Ondrej.Altman at seznam.cz Fri Mar 6 11:12:55 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Fri Mar 6 11:21:32 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: <1425640375008-4809955.post@n4.nabble.com> David, thank you for your answers. Several images & load balancing was the solution we were a little bit worried about, as we assume we are going to need more database connections then. And that was one of the goals we were thinking about, minimalize this number as much as possible. Regarding to similar combinations of requests I mentioned, those long lists of objects are overviews of big tables, and user always creates a specific filter to display their subsets. Right now I cannot imagine, how the database cache could be helpful in this case, but I will look at it. Thank you once more. Ondrej. -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4809955.html Sent from the Seaside General mailing list archive at Nabble.com. From jvdsandt at gmail.com Fri Mar 6 11:30:25 2015 From: jvdsandt at gmail.com (Jan van de Sandt) Date: Fri Mar 6 11:30:27 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <1425637052640-4809929.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: Hi, By default a call to a database like DB2 will block the image in VASt. You can change this by setting the #AllCallsThreaded preference in AbtDbmSystem to true. Then the calls with use a differente OS thread and other processes in the image will continue to run. Jan. On Fri, Mar 6, 2015 at 11:17 AM, wilwarin wrote: > Hi all, > > Currently we are developing a web application in Seaside, and it is > necessary for us to work in VAST. The application runs as a Windows > service, > and for a few days we are facing the following issue: > > - At one moment there are two users (let's call them 'A' and 'B') logged in > in the application, so we have two different sessions. > - 'A' requests a page with a long list of objects obtained from DB2, so it > takes a number of seconds to get the results. > - Less than one second after 'A''s request, 'B' requests another page, for > instance an easy static page. > - For the time the 'A''s request is handled, the 'B''s browser window > freezes and waits for those number of seconds mentioned above. > > We searched really a lot, but still the results are not what we would > expect. This issue makes as confused, because in the future the application > should serve hundreds of users with very similar combinations of requests. > > We didn't know, where our problem lies, so we tried a similar test with a > single page with a difficult calculation inside. Then we tried the same in > Pharo to exclude the problem in VAST. Both with the same results. > > Is there anything we are missing? What should we do to achieve a parallel > (or kinda better) processing of requests? > > Thank you very much for your responses. > > Ondrej > > > > -- > View this message in context: > http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150306/084f3247/attachment.htm From Ondrej.Altman at seznam.cz Fri Mar 6 13:03:45 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Fri Mar 6 13:12:24 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: <1425647025764-4809979.post@n4.nabble.com> Thank you, Jan. We will try it. Unfortunately we find out that a communication with a database is not the worst part. But, if we have many results, there is a need to process them before rendering and it takes most of time, which blocks the image. We assumed that almost every project is facing a similar issue - many sessions requesting some server-side processing simultaneously - and it won't be such difficult to make it all 'parallel'. Does it mean, that most of Seaside projects around have several images behind, so user's request is not blocked by another one? Do we have any other way to achieve that (instead of combination 'several images & load balancing)? Again, thank you all for your time. Jan van de Sandt wrote > Hi, > > By default a call to a database like DB2 will block the image in VASt. You > can change this by setting the #AllCallsThreaded preference in > AbtDbmSystem > to true. Then the calls with use a differente OS thread and other > processes > in the image will continue to run. > > Jan. > > On Fri, Mar 6, 2015 at 11:17 AM, wilwarin < > Ondrej.Altman@ > > wrote: > >> Hi all, >> >> Currently we are developing a web application in Seaside, and it is >> necessary for us to work in VAST. The application runs as a Windows >> service, >> and for a few days we are facing the following issue: >> >> - At one moment there are two users (let's call them 'A' and 'B') logged >> in >> in the application, so we have two different sessions. >> - 'A' requests a page with a long list of objects obtained from DB2, so >> it >> takes a number of seconds to get the results. >> - Less than one second after 'A''s request, 'B' requests another page, >> for >> instance an easy static page. >> - For the time the 'A''s request is handled, the 'B''s browser window >> freezes and waits for those number of seconds mentioned above. >> >> We searched really a lot, but still the results are not what we would >> expect. This issue makes as confused, because in the future the >> application >> should serve hundreds of users with very similar combinations of >> requests. >> >> We didn't know, where our problem lies, so we tried a similar test with a >> single page with a difficult calculation inside. Then we tried the same >> in >> Pharo to exclude the problem in VAST. Both with the same results. >> >> Is there anything we are missing? What should we do to achieve a parallel >> (or kinda better) processing of requests? >> >> Thank you very much for your responses. >> >> Ondrej >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4809979.html Sent from the Seaside General mailing list archive at Nabble.com. From arning315 at comcast.net Fri Mar 6 13:14:51 2015 From: arning315 at comcast.net (Bob Arning) Date: Fri Mar 6 13:14:55 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <1425637052640-4809929.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: <54F9A84B.9070007@comcast.net> You've had some good answers so far. Here are some other ideas that might also help - Can you split the single big DB2 request into several smaller ones and yield the processor between each to allow other Smalltalk processes a chance? - Can you move the DB2 requests to a separate Smalltalk image? Image one connects to image two via socket and sends the request. While image two is building the answer, image one is simply waiting for data on a socket and that can happen concurrently with other processes in image one. Cheers, Bob On 3/6/15 5:17 AM, wilwarin wrote: > Hi all, > > Currently we are developing a web application in Seaside, and it is > necessary for us to work in VAST. The application runs as a Windows service, > and for a few days we are facing the following issue: > > - At one moment there are two users (let's call them 'A' and 'B') logged in > in the application, so we have two different sessions. > - 'A' requests a page with a long list of objects obtained from DB2, so it > takes a number of seconds to get the results. > - Less than one second after 'A''s request, 'B' requests another page, for > instance an easy static page. > - For the time the 'A''s request is handled, the 'B''s browser window > freezes and waits for those number of seconds mentioned above. > > We searched really a lot, but still the results are not what we would > expect. This issue makes as confused, because in the future the application > should serve hundreds of users with very similar combinations of requests. > > We didn't know, where our problem lies, so we tried a similar test with a > single page with a difficult calculation inside. Then we tried the same in > Pharo to exclude the problem in VAST. Both with the same results. > > Is there anything we are missing? What should we do to achieve a parallel > (or kinda better) processing of requests? > > Thank you very much for your responses. > > Ondrej > > > > -- > View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150306/24ac2b1b/attachment-0001.htm From HNowak at cincom.com Fri Mar 6 13:29:31 2015 From: HNowak at cincom.com (Nowak, Helge) Date: Fri Mar 6 13:30:53 2015 Subject: AW: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1425647025764-4809979.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> <1425647025764-4809979.post@n4.nabble.com> Message-ID: <1ADAF00B5AB491448BCD6CE546DFFC261D4BBB09@IM08.cincomsys.local> Dear Ondrej, since processing the loaded data is your bottleneck: is there a way to parallelize that processing? If so, you could try parallelization using Smalltalk processes. Depending on the nature of the processing it can already yield good results. In Cincom Smalltalk you could also use MatriX to spawn worker images. As you are on VAST you don't have that out. Yet maybe VAST offers other possibilities of a similar architecture. HTH Helge -----Urspr?ngliche Nachricht----- Von: seaside-bounces@lists.squeakfoundation.org [mailto:seaside-bounces@lists.squeakfoundation.org] Im Auftrag von wilwarin Gesendet: Freitag, 6. M?rz 2015 14:04 An: seaside@lists.squeakfoundation.org Betreff: [Seaside] Re: Concurrent requests from multiple sessions Thank you, Jan. We will try it. Unfortunately we find out that a communication with a database is not the worst part. But, if we have many results, there is a need to process them before rendering and it takes most of time, which blocks the image. We assumed that almost every project is facing a similar issue - many sessions requesting some server-side processing simultaneously - and it won't be such difficult to make it all 'parallel'. Does it mean, that most of Seaside projects around have several images behind, so user's request is not blocked by another one? Do we have any other way to achieve that (instead of combination 'several images & load balancing)? Again, thank you all for your time. Jan van de Sandt wrote > Hi, > > By default a call to a database like DB2 will block the image in VASt. > You can change this by setting the #AllCallsThreaded preference in > AbtDbmSystem to true. Then the calls with use a differente OS thread > and other processes in the image will continue to run. > > Jan. > > On Fri, Mar 6, 2015 at 11:17 AM, wilwarin < > Ondrej.Altman@ > > wrote: > >> Hi all, >> >> Currently we are developing a web application in Seaside, and it is >> necessary for us to work in VAST. The application runs as a Windows >> service, and for a few days we are facing the following issue: >> >> - At one moment there are two users (let's call them 'A' and 'B') >> logged in in the application, so we have two different sessions. >> - 'A' requests a page with a long list of objects obtained from DB2, >> so it takes a number of seconds to get the results. >> - Less than one second after 'A''s request, 'B' requests another >> page, for instance an easy static page. >> - For the time the 'A''s request is handled, the 'B''s browser window >> freezes and waits for those number of seconds mentioned above. >> >> We searched really a lot, but still the results are not what we would >> expect. This issue makes as confused, because in the future the >> application should serve hundreds of users with very similar >> combinations of requests. >> >> We didn't know, where our problem lies, so we tried a similar test >> with a single page with a difficult calculation inside. Then we tried >> the same in Pharo to exclude the problem in VAST. Both with the same >> results. >> >> Is there anything we are missing? What should we do to achieve a >> parallel (or kinda better) processing of requests? >> >> Thank you very much for your responses. >> >> Ondrej >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp48 >> 09929.html Sent from the Seaside General mailing list archive at >> Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4809979.html Sent from the Seaside General mailing list archive at Nabble.com. _______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From sven at stfx.eu Fri Mar 6 14:55:40 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Fri Mar 6 14:55:46 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <1425637052640-4809929.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: <9C63998D-CC9E-475A-BD39-C714E61DCE45@stfx.eu> > On 06 Mar 2015, at 11:17, wilwarin wrote: > > We didn't know, where our problem lies, so we tried a similar test with a > single page with a difficult calculation inside. Then we tried the same in > Pharo to exclude the problem in VAST. Both with the same results. I just tried the following on Pharo 4 with Seaside 3.1, in a WATask go self inform: 'WATest1 ready.'. (self confirm: 'Wait 30s ?') ifTrue: [ (self confirm: 'Do some benchmarking ?') ifTrue: [ self inform: ([ 100 factorial ] benchFor: 30 seconds) asString ] ifFalse: [ 30 seconds wait. self inform: 'Back from waiting 30s' ] ] ifFalse: [ self inform: 'OK then, I did not wait' ] In both cases, you can do other work during the 30s. Of course, things will get quite slow during the benchmarking, but that is logical since you are pushing the machine 100%, consuming all CPU power. Like Jan suggests, some DB interfaces are blocking, effectively killing (serialising) multiprocessing. I know that PostgresV2 is not like that, since it uses a TCP networking interface. But that problem (not being able to process concurrent requests) is certainly not inherent to Seaside or Pharo. If that were the case we should all stop using it. Sven From philippe.marschall at gmail.com Fri Mar 6 17:09:58 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Fri Mar 6 17:10:00 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <1425637052640-4809929.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: On Fri, Mar 6, 2015 at 11:17 AM, wilwarin wrote: > Hi all, > > Currently we are developing a web application in Seaside, and it is > necessary for us to work in VAST. The application runs as a Windows service, > and for a few days we are facing the following issue: > > - At one moment there are two users (let's call them 'A' and 'B') logged in > in the application, so we have two different sessions. > - 'A' requests a page with a long list of objects obtained from DB2, so it > takes a number of seconds to get the results. > - Less than one second after 'A''s request, 'B' requests another page, for > instance an easy static page. > - For the time the 'A''s request is handled, the 'B''s browser window > freezes and waits for those number of seconds mentioned above. > > We searched really a lot, but still the results are not what we would > expect. This issue makes as confused, because in the future the application > should serve hundreds of users with very similar combinations of requests. > > We didn't know, where our problem lies, so we tried a similar test with a > single page with a difficult calculation inside. Then we tried the same in > Pharo to exclude the problem in VAST. Both with the same results. > > Is there anything we are missing? What should we do to achieve a parallel > (or kinda better) processing of requests? > > Thank you very much for your responses. The only Seaside limitation I'm aware of is a lock around every session. So only one request of 'A' can be processed at any given time. However this should not affect any other users. The lock is there because sessions and components are mutable. Use the code from Sven to verify Seaside and your webserver are not the issue. In theory it is possible for Seaside to stream the response to the client while rendering it on the sever. This should consume less resources on the server (because not whole response has to be build in the server) and should improve the feel of responsiveness on the client because the browser can start rendering before the response if fully received. However this requires server support, I don't know the state of this in VA. Also you can't display an error page in case of an exception. Also you have various other options like pagination our loading via JavaScript. Using multiple images which Seaside is possible but has pros and cons. On the positive side you can make use of multiple CPUs and have better availability. On the negative side you'll have to implement sticky sessions (we support faking jvmRoute) and you'll have to juggle multiple images. Cheers Philippe From sglazier456 at gmail.com Fri Mar 6 17:33:14 2015 From: sglazier456 at gmail.com (Sean Glazier) Date: Fri Mar 6 17:33:21 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <9C63998D-CC9E-475A-BD39-C714E61DCE45@stfx.eu> References: <1425637052640-4809929.post@n4.nabble.com> <9C63998D-CC9E-475A-BD39-C714E61DCE45@stfx.eu> Message-ID: <9CB79AA6-3790-4798-A468-409AD648C690@gmail.com> I would make a specialized DB 2 interface in c that makes the request in an OS thread that the signals the vast vm when the result is in. Your vast vm will not then block preventing the processing of the DB 2 request. In visual works we have thappi precisely because of these DB and other blocking issues. You can make a similar system for vast c calls only you will need to generalize a solution to give rhe needed information for the call and the data. You can spike a solution easily enough for the DB 2 calls by creating a dll of the same name that vast loads rather than the DB 2 dll. You dll starts up a thread pool and forwards the call in a new thread. You will need to coordinate your response etc so you are not blocking the vm thread allowing it to respond to other seaside sessions. Sean Sent from my iPhone Sean Glazier Light your self on fire with Enthusiasm and people will come for miles around to watch you burn! On Mar 6, 2015, at 15:55, Sven Van Caekenberghe wrote: > >> On 06 Mar 2015, at 11:17, wilwarin wrote: >> >> We didn't know, where our problem lies, so we tried a similar test with a >> single page with a difficult calculation inside. Then we tried the same in >> Pharo to exclude the problem in VAST. Both with the same results. > > I just tried the following on Pharo 4 with Seaside 3.1, in a WATask > > go > self inform: 'WATest1 ready.'. > (self confirm: 'Wait 30s ?') > ifTrue: [ > (self confirm: 'Do some benchmarking ?') > ifTrue: [ > self inform: ([ 100 factorial ] benchFor: 30 seconds) asString ] > ifFalse: [ > 30 seconds wait. > self inform: 'Back from waiting 30s' ] ] > ifFalse: [ self inform: 'OK then, I did not wait' ] > > In both cases, you can do other work during the 30s. Of course, things will get quite slow during the benchmarking, but that is logical since you are pushing the machine 100%, consuming all CPU power. > > Like Jan suggests, some DB interfaces are blocking, effectively killing (serialising) multiprocessing. I know that PostgresV2 is not like that, since it uses a TCP networking interface. > > But that problem (not being able to process concurrent requests) is certainly not inherent to Seaside or Pharo. If that were the case we should all stop using it. > > Sven > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From laura.risani at gmail.com Fri Mar 6 18:43:11 2015 From: laura.risani at gmail.com (Laura Risani) Date: Fri Mar 6 18:43:14 2015 Subject: [Seaside] Re: Page title and end screen In-Reply-To: <1425518035684-4809624.post@n4.nabble.com> References: <1425506141686-4809600.post@n4.nabble.com> <1425518035684-4809624.post@n4.nabble.com> Message-ID: > > I'd just make a static page that had the 'you have left' messaging and > leave > it at that. OR use Seaside-REST to show a component at whatever URL you > want. > > Ok. I'll go with the static page then. > What's the value of your use case vs just using a dedicated "Thanks & come > back soon" page? > The user is moving out of a kind of room because he either left or was kicked. I want to give feedback on the reason and on the success of the request. Personally i don't like the "come back soon" msg. I find it imperative, i prefer a msg that highlights what one have to offer / why to come back. Yet perhaps this can't be said shortly enough, and also perhaps "come back soon" sounds nicer to native speakers than to me. > > To attempt the 'line of text' bit you maybe could just use That works nice too! Love, Laura -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150306/a1aa248d/attachment.htm From laura.risani at gmail.com Fri Mar 6 18:52:54 2015 From: laura.risani at gmail.com (Laura Risani) Date: Fri Mar 6 18:52:56 2015 Subject: [Seaside] %2B instead of spaces Message-ID: Hi all, Having rendered this html textArea callback: [ :value | self actionWith: value ]; ... When the callback is processed the value argument has all white spaces (inputed pressing the space key) replaced by '%2B'. Should i change them manually or there is another way to fix it? I'm not sure this happened before i removed development tools sending WAAdmin applicationDefaults removeParent: WADevelopmentConfiguration instance. Love, Laura -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150306/17da8bab/attachment-0001.htm From arning315 at comcast.net Fri Mar 6 21:06:07 2015 From: arning315 at comcast.net (Bob Arning) Date: Fri Mar 6 21:06:10 2015 Subject: [Seaside] %2B instead of spaces In-Reply-To: References: Message-ID: <54FA16BF.6090307@comcast.net> Well, %2B is the "+", so it's not even what you entered, encoded or not. I did notice you were having some issues related to encoding a few days ago. Could those have something to do with this problem? On 3/6/15 1:52 PM, Laura Risani wrote: > Hi all, > > Having rendered this > > html textAreacallback: [ :value | self actionWith: value ]; ... > > When the callback is processed the value argument has all white spaces > (inputed pressing the space key) replaced by '%2B'. > > Should i change them manually or there is another way to fix it? > > I'm not sure this happened before i removed development tools sending > > WAAdmin applicationDefaults > removeParent: WADevelopmentConfiguration instance. > > > Love, > Laura > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150306/10aec189/attachment.htm From Das.Linux at gmx.de Fri Mar 6 21:14:44 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 6 21:14:48 2015 Subject: [Seaside] %2B instead of spaces In-Reply-To: <54FA16BF.6090307@comcast.net> References: <54FA16BF.6090307@comcast.net> Message-ID: Hi, On 06.03.2015, at 22:06, Bob Arning wrote: > Well, %2B is the "+", so it's not even what you entered, encoded or not. I did notice you were having some issues related to encoding a few days ago. Could those have something to do with this problem? This could be a double encoding problem: in Form-urlencoded requests, a space can be represented by a + [1] but apparently, the + then got urlencoded itself. note the + is a space only in the _query_ of the request. Best -Tobias [1] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 > > On 3/6/15 1:52 PM, Laura Risani wrote: >> Hi all, >> >> Having rendered this >> >> html textArea callback: [ :value | self actionWith: value ]; ... >> >> When the callback is processed the value argument has all white spaces (inputed pressing the space key) replaced by '%2B'. >> >> Should i change them manually or there is another way to fix it? >> >> I'm not sure this happened before i removed development tools sending >> >> WAAdmin applicationDefaults >> removeParent: WADevelopmentConfiguration instance. >> >> >> Love, >> Laura >> >> >> _______________________________________________ >> seaside mailing list >> >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From laura.risani at gmail.com Fri Mar 6 23:28:36 2015 From: laura.risani at gmail.com (Laura Risani) Date: Fri Mar 6 23:28:39 2015 Subject: [Seaside] %2B instead of spaces In-Reply-To: References: <54FA16BF.6090307@comcast.net> Message-ID: Hi, Tried changing app charset but didn't change a thing. Perhaps it has something to do with the adaptor i'm using, changes i made. Yet retrieving the textArea value through a script gives the right text, so i'll do that it until the case i found another solution. Best, Laura On Fri, Mar 6, 2015 at 6:14 PM, Tobias Pape wrote: > Hi, > > On 06.03.2015, at 22:06, Bob Arning wrote: > > > Well, %2B is the "+", so it's not even what you entered, encoded or not. > I did notice you were having some issues related to encoding a few days > ago. Could those have something to do with this problem? > > This could be a double encoding problem: > in Form-urlencoded requests, a space can be represented by a + [1] > but apparently, the + then got urlencoded itself. > > note the + is a space only in the _query_ of the request. > > Best > -Tobias > > > > [1] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 > > > > > On 3/6/15 1:52 PM, Laura Risani wrote: > >> Hi all, > >> > >> Having rendered this > >> > >> html textArea callback: [ :value | self actionWith: value ]; ... > >> > >> When the callback is processed the value argument has all white spaces > (inputed pressing the space key) replaced by '%2B'. > >> > >> Should i change them manually or there is another way to fix it? > >> > >> I'm not sure this happened before i removed development tools sending > >> > >> WAAdmin applicationDefaults > >> removeParent: WADevelopmentConfiguration instance. > >> > >> > >> Love, > >> Laura > >> > >> > >> _______________________________________________ > >> seaside mailing list > >> > >> seaside@lists.squeakfoundation.org > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150306/0a6b2c3f/attachment.htm From stormbyte at gmail.com Sat Mar 7 15:31:49 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Sat Mar 7 15:32:01 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions References: <1425637052640-4809929.post@n4.nabble.com> <1425640375008-4809955.post@n4.nabble.com> Message-ID: wilwarin wrote: > David, thank you for your answers. > > Several images & load balancing was the solution we were a little bit > worried about, as we assume we are going to need more database connections > then. And that was one of the goals we were thinking about, minimalize > this number as much as possible. > > Regarding to similar combinations of requests I mentioned, those long > lists of objects are overviews of big tables, and user always creates a > specific filter to display their subsets. Right now I cannot imagine, how > the database cache could be helpful in this case, but I will look at it. > > Thank you once more. > > Ondrej. > > > > -- > View this message in context: > http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4809955.html > Sent from the Seaside General mailing list archive at Nabble.com. The number of connections should not worry you if you use a pool with a healthy maximum number of connections defined. For the cache, well, it is only useful for gathering same data, I mean: User A asks for X * query database * store cache User B asks for X * retrieve from cache User C adds items * query database * invalidate cache About the filters, depending on the data amount, a) you can apply filters after database data is grabbed, or b) directly into database. With a) you gain more cache hits, but you may lose some performance if the data/filters combination is expensive With b) you will have likelly less cache hits (because you should store in cache data+filter combination but you may gain potentially a bit of performance. Those are the 2 cases of study here From stormbyte at gmail.com Sat Mar 7 15:36:22 2015 From: stormbyte at gmail.com (David Carlos Manuelda) Date: Sat Mar 7 15:40:13 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions References: <1425637052640-4809929.post@n4.nabble.com> <1425647025764-4809979.post@n4.nabble.com> Message-ID: wilwarin wrote: > Does it mean, that most of Seaside projects around have several images > behind, so user's request is not blocked by another one? Do we have any > other way to achieve that (instead of combination 'several images & load > balancing)? > For that I have an idea. In an experiment, when I was programming my own database connection pool, I decided to try to have many opened connections in the pool, and use one of those connections per query. That could potentially help you into the blocking process. I mean, while user A is executing operations in connection A, user B can just grab connection B to execute its own operations without affecting user A (except if you use transaction and you have locked tables). That will work also for small operations, when you grab a connection, execute actions and return the connection to the pool. Depending on your use case, this schema may help you also without the need for more images, but I insist, even if you fork the expensive processes, pharo is still green threaded, so you can't expect it being so responsibe under such a heavy load. From sm at planage.com Sat Mar 7 16:30:49 2015 From: sm at planage.com (Sanjay Minni) Date: Sat Mar 7 16:39:36 2015 Subject: [Seaside] Pls help in this error ... Method Not Allowed POST /irr?_s... Message-ID: <1425745849311-4810290.post@n4.nabble.com> Hi This error has cropped up all of a sudden while I have been making minor changes to the site www.uxfin.com "Method Not Allowed POST /irr?_s..." this comes when you click on the last button [Add Data Lines] at the bottom of the page. Pls advice on what it is and how to solve regards Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Pls-help-in-this-error-Method-Not-Allowed-POST-irr-s-tp4810290.html Sent from the Seaside General mailing list archive at Nabble.com. From sm at planage.com Sat Mar 7 17:14:06 2015 From: sm at planage.com (Sanjay Minni) Date: Sat Mar 7 17:22:52 2015 Subject: [Seaside] Re: Pls help in this error ... Method Not Allowed POST /irr?_s... In-Reply-To: <1425745849311-4810290.post@n4.nabble.com> References: <1425745849311-4810290.post@n4.nabble.com> Message-ID: <1425748446206-4810300.post@n4.nabble.com> Ok ... seems its narrowed to to cases where I click the button without entering any info in the immediately two preceeding date fields - so will probably have to initialise that regards ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Pls-help-in-this-error-Method-Not-Allowed-POST-irr-s-tp4810290p4810300.html Sent from the Seaside General mailing list archive at Nabble.com. From jtuchel at objektfabrik.de Sun Mar 8 18:57:21 2015 From: jtuchel at objektfabrik.de (Joachim Tuchel) Date: Sun Mar 8 18:57:24 2015 Subject: [Seaside] Twitter Bootstrap, Checkboxes and Seaside Message-ID: <54FC9B91.6040203@objektfabrik.de> We've recently used Bootstrap a lot to improve the look and feel and - even more important - cross-browser experience of some of our applications. So far, this has been a great experience, we achieve a lot in little time... There is, however, a strange effect when it comes to Radio Buttons and Checkboxes. In Bootstrap on Seaside, these are misplaced by a few pixels (not in the middle of a line, but a few pixels further down). This only happens in Seaside, normal html pages do not show this effect (and I would have been very surprised if this were the case). So we tried to find out what is different in Seaside that in the Bootstrap samples on getbootstrap.com. And in fact, there is a difference: Seaside renders a checkbox like this:
It turns out that if you remove class="checkbox" from the input tag, Bootstrap renders the checkboxes beautifully and aligned perfectly. So it was time to dig into the way Seaside renders a checkbox, and here is what I found: WAFormInputTag>>#with: aBlock self type isNil ifFalse: [ self attributes at: 'type' ifAbsentPut: [ self type ]. self class: self type ]. "This line causes the problem" super with: aBlock This is not easy to fix by subclassing or anything, We even tried overriding the method, but Monticello turned Checkboxes into a mess after the overridden version of with: was loaded. We ended up fixing a private copy of Seaside (which, imo, is the worst possible solution): WAFormInputTag>>#with: aBlock self type isNil ifFalse: [ self attributes at: 'type' ifAbsentPut: [ self type ]. self type = 'checkbox' ifFalse: [self class: self type] ]. super with: aBlock So here are a few questions that I'd like to ask and discuss with more experienced Seasiders: * can anybody confirm the effect (Checkbox not vertical-aligned correctly as long as the class="checkbox") is present? And can you also confirm that removing the class fixes the issue in our browsers (I tried IE11, FF34 and 36, Opera and Safari 7.x)? * Of course I could try to change Boostrap CSS files to not do whatever it does to .checkbox elements (I guess they wanted to allow for div, span etc, but never thought anybody would add a class "checkbox" to a checkbox input tag...). But it would feel strange to me, because it is not Bootstrap that is broken (well, you could argue about this, but, you know, I need to make an argument) * Why is this extra class attribute being set for form inputs anyways? Is it really needed for anything (other than css referencing that could possibly better use [type="checkbox"]. Wouldn't it be best to remove the setting of the class in WAFormInputTag, or would this break things? * Do others see a more elegant way to override the above-mentioned method for checkboxes? I can only think of extracting the erronous line to a method that could be overridden in WACheckboxTag to not set the class. But this would also mean I have to change Seaside code and/or ask the Seaside maintainers to accept this change. (Which, in the end, I do anyways ;-) I look forward to your comments and suggestions and - hopefully - some support on my idea of completely removing that self class: self type thingie. I think it is just unnecessary. Joachim From laura.risani at gmail.com Sun Mar 8 19:56:36 2015 From: laura.risani at gmail.com (Laura Risani) Date: Sun Mar 8 19:56:39 2015 Subject: [Seaside] Free hosting a Seaside app? Message-ID: Hi all, I've developed under Pharo 3 a Seaside3 app having in mind to try it at seasidehosting web. But then i tried to run it and get this system logout "Press CR to quit...This interpreter (vers. 6502) cannot read image file (vers. 6505)." The FAQ reads "Your image was previously saved by a JIT VM (Cog, Squeak5.x). Due technical reasons, we're currently unable to support such images. Try building your application using a Squeak 3.x/4.x VM." Also i've made some changes to the listener i use. Does all this mean i can't use seasidehosting ? Is there any workaround / hosting alternative ? Love, Laura -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150308/2e891c14/attachment.htm From lewis at mail.msen.com Sun Mar 8 20:18:46 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 8 20:18:47 2015 Subject: [Seaside] Free hosting a Seaside app? In-Reply-To: References: Message-ID: <20150308201846.GA23605@shell.msen.com> On Sun, Mar 08, 2015 at 04:56:36PM -0300, Laura Risani wrote: > Hi all, > > I've developed under Pharo 3 a Seaside3 app having in mind to try it at > seasidehosting web. But then i tried to run it and get this system logout > > "Press CR to quit...This interpreter (vers. 6502) cannot read image file > (vers. 6505)." > > The FAQ reads > > "Your image was previously saved by a JIT VM (Cog, Squeak5.x). Due > technical reasons, we're currently unable to support such images. Try > building your application using a Squeak 3.x/4.x VM." > > Also i've made some changes to the listener i use. > > Does all this mean i can't use seasidehosting ? > Is there any workaround / hosting alternative ? Hi Laura, The error message indicates that seasidehosting is using an extremely old standard interpreter VM. Most likely you will need another hosting alternative. Dave From johan at inceptive.be Mon Mar 9 11:46:47 2015 From: johan at inceptive.be (Johan Brichau) Date: Mon Mar 9 11:46:44 2015 Subject: [Seaside] Twitter Bootstrap, Checkboxes and Seaside In-Reply-To: <54FC9B91.6040203@objektfabrik.de> References: <54FC9B91.6040203@objektfabrik.de> Message-ID: Hey Joachim, This is something we indeed changed in Seaside 3.2.0 [1] It?s not released yet but it will do what you want. cheers Johan [1] https://code.google.com/p/seaside/wiki/Seaside320Changelog > On 08 Mar 2015, at 19:57, Joachim Tuchel wrote: > > We've recently used Bootstrap a lot to improve the look and feel and - even more important - cross-browser experience of some of our applications. So far, this has been a great experience, we achieve a lot in little time... > > There is, however, a strange effect when it comes to Radio Buttons and Checkboxes. In Bootstrap on Seaside, these are misplaced by a few pixels (not in the middle of a line, but a few pixels further down). This only happens in Seaside, normal html pages do not show this effect (and I would have been very surprised if this were the case). > > So we tried to find out what is different in Seaside that in the Bootstrap samples on getbootstrap.com. > > And in fact, there is a difference: Seaside renders a checkbox like this: > >
> >
> > It turns out that if you remove class="checkbox" from the input tag, Bootstrap renders the checkboxes beautifully and aligned perfectly. > > So it was time to dig into the way Seaside renders a checkbox, and here is what I found: > > WAFormInputTag>>#with: aBlock > self type isNil ifFalse: [ > self attributes at: 'type' ifAbsentPut: [ self type ]. > self class: self type ]. "This line causes the problem" > super with: aBlock > > This is not easy to fix by subclassing or anything, We even tried overriding the method, but Monticello turned Checkboxes into a mess after the overridden version of with: was loaded. We ended up fixing a private copy of Seaside (which, imo, is the worst possible solution): > > WAFormInputTag>>#with: aBlock > self type isNil ifFalse: [ > self attributes at: 'type' ifAbsentPut: [ self type ]. > self type = 'checkbox' ifFalse: [self class: self type] ]. > super with: aBlock > > > So here are a few questions that I'd like to ask and discuss with more experienced Seasiders: > > * can anybody confirm the effect (Checkbox not vertical-aligned correctly as long as the class="checkbox") is present? And can you also confirm that removing the class fixes the issue in our browsers (I tried IE11, FF34 and 36, Opera and Safari 7.x)? > > * Of course I could try to change Boostrap CSS files to not do whatever it does to .checkbox elements (I guess they wanted to allow for div, span etc, but never thought anybody would add a class "checkbox" to a checkbox input tag...). But it would feel strange to me, because it is not Bootstrap that is broken (well, you could argue about this, but, you know, I need to make an argument) > > * Why is this extra class attribute being set for form inputs anyways? Is it really needed for anything (other than css referencing that could possibly better use [type="checkbox"]. Wouldn't it be best to remove the setting of the class in WAFormInputTag, or would this break things? > > * Do others see a more elegant way to override the above-mentioned method for checkboxes? I can only think of extracting the erronous line to a method that could be overridden in WACheckboxTag to not set the class. But this would also mean I have to change Seaside code and/or ask the Seaside maintainers to accept this change. (Which, in the end, I do anyways ;-) > > > I look forward to your comments and suggestions and - hopefully - some support on my idea of completely removing that > > self class: self type > > thingie. I think it is just unnecessary. > > > Joachim > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150309/941bf7d2/attachment.htm From jtuchel at objektfabrik.de Mon Mar 9 14:40:34 2015 From: jtuchel at objektfabrik.de (Joachim Tuchel) Date: Mon Mar 9 14:40:40 2015 Subject: [Seaside] Twitter Bootstrap, Checkboxes and Seaside In-Reply-To: References: <54FC9B91.6040203@objektfabrik.de> Message-ID: Johan, Thx a lot. So in 3.2 there will be no additional class=type tags by default, right? This means I can remove the ifTrue: from my personal fix completely. This makes a lot of sense. Joachim > Am 09.03.2015 um 12:46 schrieb Johan Brichau : > > Hey Joachim, > > This is something we indeed changed in Seaside 3.2.0 [1] > It?s not released yet but it will do what you want. > > cheers > Johan > > [1] https://code.google.com/p/seaside/wiki/Seaside320Changelog > >> On 08 Mar 2015, at 19:57, Joachim Tuchel wrote: >> >> We've recently used Bootstrap a lot to improve the look and feel and - even more important - cross-browser experience of some of our applications. So far, this has been a great experience, we achieve a lot in little time... >> >> There is, however, a strange effect when it comes to Radio Buttons and Checkboxes. In Bootstrap on Seaside, these are misplaced by a few pixels (not in the middle of a line, but a few pixels further down). This only happens in Seaside, normal html pages do not show this effect (and I would have been very surprised if this were the case). >> >> So we tried to find out what is different in Seaside that in the Bootstrap samples on getbootstrap.com. >> >> And in fact, there is a difference: Seaside renders a checkbox like this: >> >>
>> >>
>> >> It turns out that if you remove class="checkbox" from the input tag, Bootstrap renders the checkboxes beautifully and aligned perfectly. >> >> So it was time to dig into the way Seaside renders a checkbox, and here is what I found: >> >> WAFormInputTag>>#with: aBlock >> self type isNil ifFalse: [ >> self attributes at: 'type' ifAbsentPut: [ self type ]. >> self class: self type ]. "This line causes the problem" >> super with: aBlock >> >> This is not easy to fix by subclassing or anything, We even tried overriding the method, but Monticello turned Checkboxes into a mess after the overridden version of with: was loaded. We ended up fixing a private copy of Seaside (which, imo, is the worst possible solution): >> >> WAFormInputTag>>#with: aBlock >> self type isNil ifFalse: [ >> self attributes at: 'type' ifAbsentPut: [ self type ]. >> self type = 'checkbox' ifFalse: [self class: self type] ]. >> super with: aBlock >> >> >> So here are a few questions that I'd like to ask and discuss with more experienced Seasiders: >> >> * can anybody confirm the effect (Checkbox not vertical-aligned correctly as long as the class="checkbox") is present? And can you also confirm that removing the class fixes the issue in our browsers (I tried IE11, FF34 and 36, Opera and Safari 7.x)? >> >> * Of course I could try to change Boostrap CSS files to not do whatever it does to .checkbox elements (I guess they wanted to allow for div, span etc, but never thought anybody would add a class "checkbox" to a checkbox input tag...). But it would feel strange to me, because it is not Bootstrap that is broken (well, you could argue about this, but, you know, I need to make an argument) >> >> * Why is this extra class attribute being set for form inputs anyways? Is it really needed for anything (other than css referencing that could possibly better use [type="checkbox"]. Wouldn't it be best to remove the setting of the class in WAFormInputTag, or would this break things? >> >> * Do others see a more elegant way to override the above-mentioned method for checkboxes? I can only think of extracting the erronous line to a method that could be overridden in WACheckboxTag to not set the class. But this would also mean I have to change Seaside code and/or ask the Seaside maintainers to accept this change. (Which, in the end, I do anyways ;-) >> >> >> I look forward to your comments and suggestions and - hopefully - some support on my idea of completely removing that >> >> self class: self type >> >> thingie. I think it is just unnecessary. >> >> >> Joachim >> >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150309/ddfaab23/attachment-0001.htm From sm at planage.com Tue Mar 10 09:18:31 2015 From: sm at planage.com (Sanjay Minni) Date: Tue Mar 10 09:27:38 2015 Subject: [Seaside] Triggerring save / submit of another form Message-ID: <1425979111011-4810872.post@n4.nabble.com> Hi, How can save data in a form other than the one in which the submitbutton is clicked ? the page on www.uxfin.com contains 3 separate forms (separated by horizontal rules). Users may typically leave midway while entering data in the top form and click a submit button on any of the 2 lower forms. At that time the last value entered is not captured. How can I force this programmatically Thanks Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872.html Sent from the Seaside General mailing list archive at Nabble.com. From Ondrej.Altman at seznam.cz Tue Mar 10 10:15:12 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Tue Mar 10 10:24:16 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1425637052640-4809929.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: <1425982512096-4810877.post@n4.nabble.com> Hi all, please excuse my inactivity, now I would like to summarize all above, and to ask you maybe for a few last answers and advices. Regarding to mentioned DB2, as I assumed, database is definitely not an issue, so I am sorry for my inaccuracy in my first post. At the moment we are sure that there is no block from the database side (we can see the block in data processing). Thank you guys for your solution proposals. > The only Seaside limitation I'm aware of is a lock around every > session. So only one request of 'A' can be processed at any given > time. However this should not affect any other users. The lock is > there because sessions and components are mutable. Use the code from > Sven to verify Seaside and your webserver are not the issue. This is the behavior we assumed, this (max. one request per session at any time) has to be, and actually is, enough. However we are really surprised, that other users are affected. And by our investigation they are always affected by every concurrent request, no matter how difficult it is. ( I tried Sven's code and it is possible to do another work during waiting, it is OK. ) > But that problem (not being able to process concurrent requests) is > certainly not inherent to Seaside or Pharo. If that were the case we > should all stop using it. Hopefully I understand, so it is not the case. If I am correct, it means that in Seaside it is necessary to solve similar situations with different access. In case of for example difficult server-side calculation (or processing of big amount of data), we have to count on a possible problem with concurrent requests from multiple sessions. Am I right? Or, if not, where could the problem lay? As I wrote, we are working in VAST - I tried to simulate the same problem in Pharo with the same result, so I think in this case it does not matter much. Regarding to Apache (or, when we run it from code), everything is in default configuration. Database is not an issue. For me it looks like everything, that I wrote here, is a standard behavior of application build on Seaside => the application which has to serve not-so-easy concurrent requests has to use some way around (multiple images & load balancing, parallelization of processes, ...). Please correct me if I am wrong. Guys, could you please tell me what I am missing? Maybe I can imagine, that the application we are developing is not a 'standard' Seaside app (in the sense of data amount and its difficult server-side processing). Then I believe it would require a non-standard architecture (according to that all, is Seaside still the path we can/should follow?). It is our problem, we do not know about a reliable way to do that - and this is the reason, why I am asking here. What would you recommend? Thank you again for your time, and thank you for your responses in advance. Cheers, Ondrej. -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4810877.html Sent from the Seaside General mailing list archive at Nabble.com. From sm at planage.com Tue Mar 10 10:31:05 2015 From: sm at planage.com (Sanjay Minni) Date: Tue Mar 10 10:40:11 2015 Subject: [Seaside] Re: Free hosting a Seaside app? In-Reply-To: <20150308201846.GA23605@shell.msen.com> References: <20150308201846.GA23605@shell.msen.com> Message-ID: <1425983465823-4810879.post@n4.nabble.com> Hi Laura, I am using pharocloud.com for an experimental website uxfin.com it has a basic plan of $2 a month ... and Mike's support is excellent You can give it a shot regards Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Free-hosting-a-Seaside-app-tp4810478p4810879.html Sent from the Seaside General mailing list archive at Nabble.com. From sven at stfx.eu Tue Mar 10 11:12:08 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Tue Mar 10 11:12:13 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1425982512096-4810877.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> Message-ID: > On 10 Mar 2015, at 11:15, wilwarin wrote: > > ( I tried Sven's code and it is possible to do another work during waiting, > it is OK. ) Does it also work (slowly) during the benchmark ? That simulates your 'long running work'. >> But that problem (not being able to process concurrent requests) is >> certainly not inherent to Seaside or Pharo. If that were the case we >> should all stop using it. > > Hopefully I understand, so it is not the case. If I am correct, it means > that in Seaside it is necessary to solve similar situations with different > access. In case of for example difficult server-side calculation (or > processing of big amount of data), we have to count on a possible problem > with concurrent requests from multiple sessions. Am I right? Or, if not, > where could the problem lay? What everybody here tries to explain to you is that the problem is most probably in your DB driver (in Smalltalk or further down): it probably cannot do more than one concurrent request (as it is currently implemented). That is not a Seaside nor a fundamental Smalltalk problem. Try investigating that aspect, separate from Seaside. From HNowak at cincom.com Tue Mar 10 11:31:44 2015 From: HNowak at cincom.com (Nowak, Helge) Date: Tue Mar 10 11:33:11 2015 Subject: AW: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> Message-ID: <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> Hmm, I am sure Ondrej understood what was proposed. He mentioned at least twice that the DB connections are NOT the problem. He said that the processing AFTER loading the data from the database into the image is the problem. Why shouldn't I believe him? OTOH I believe you Seaside experts that Seaside's architecture is inherently non-blocking between sessions. Thus there are two questions: - how could any processing block the whole Seaside image? - how to find possibly problematic spots in Ondrej's application code? Once that is resolved one could think about further improvements. Cheers Helge -----Urspr?ngliche Nachricht----- Von: seaside-bounces@lists.squeakfoundation.org [mailto:seaside-bounces@lists.squeakfoundation.org] Im Auftrag von Sven Van Caekenberghe Gesendet: Dienstag, 10. M?rz 2015 12:12 An: Seaside - general discussion Betreff: Re: [Seaside] Re: Concurrent requests from multiple sessions > On 10 Mar 2015, at 11:15, wilwarin wrote: > > ( I tried Sven's code and it is possible to do another work during > waiting, it is OK. ) Does it also work (slowly) during the benchmark ? That simulates your 'long running work'. >> But that problem (not being able to process concurrent requests) is >> certainly not inherent to Seaside or Pharo. If that were the case we >> should all stop using it. > > Hopefully I understand, so it is not the case. If I am correct, it > means that in Seaside it is necessary to solve similar situations with > different access. In case of for example difficult server-side > calculation (or processing of big amount of data), we have to count on > a possible problem with concurrent requests from multiple sessions. Am > I right? Or, if not, where could the problem lay? What everybody here tries to explain to you is that the problem is most probably in your DB driver (in Smalltalk or further down): it probably cannot do more than one concurrent request (as it is currently implemented). That is not a Seaside nor a fundamental Smalltalk problem. Try investigating that aspect, separate from Seaside._______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From sven at stfx.eu Tue Mar 10 11:51:12 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Tue Mar 10 11:51:18 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> Message-ID: Well, we can't help him unless he give us a reproducible case. My code shows there is no such problem. There might be some miscommunication going on, but from my cursory reading, I got the impression that he suggests there is a fundamental problem with something except his own code. > On 10 Mar 2015, at 12:31, Nowak, Helge wrote: > > Hmm, > > I am sure Ondrej understood what was proposed. He mentioned at least twice that the DB connections are NOT the problem. He said that the processing AFTER loading the data from the database into the image is the problem. Why shouldn't I believe him? OTOH I believe you Seaside experts that Seaside's architecture is inherently non-blocking between sessions. > > Thus there are two questions: > - how could any processing block the whole Seaside image? > - how to find possibly problematic spots in Ondrej's application code? > > Once that is resolved one could think about further improvements. > > Cheers > Helge > > -----Urspr?ngliche Nachricht----- > Von: seaside-bounces@lists.squeakfoundation.org [mailto:seaside-bounces@lists.squeakfoundation.org] Im Auftrag von Sven Van Caekenberghe > Gesendet: Dienstag, 10. M?rz 2015 12:12 > An: Seaside - general discussion > Betreff: Re: [Seaside] Re: Concurrent requests from multiple sessions > > >> On 10 Mar 2015, at 11:15, wilwarin wrote: >> >> ( I tried Sven's code and it is possible to do another work during >> waiting, it is OK. ) > > Does it also work (slowly) during the benchmark ? > That simulates your 'long running work'. > >>> But that problem (not being able to process concurrent requests) is >>> certainly not inherent to Seaside or Pharo. If that were the case we >>> should all stop using it. >> >> Hopefully I understand, so it is not the case. If I am correct, it >> means that in Seaside it is necessary to solve similar situations with >> different access. In case of for example difficult server-side >> calculation (or processing of big amount of data), we have to count on >> a possible problem with concurrent requests from multiple sessions. Am >> I right? Or, if not, where could the problem lay? > > What everybody here tries to explain to you is that the problem is most probably in your DB driver (in Smalltalk or further down): it probably cannot do more than one concurrent request (as it is currently implemented). That is not a Seaside nor a fundamental Smalltalk problem. > > Try investigating that aspect, separate from Seaside._______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From arning315 at comcast.net Tue Mar 10 12:42:53 2015 From: arning315 at comcast.net (Bob Arning) Date: Tue Mar 10 12:42:57 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> Message-ID: <54FEE6CD.1000301@comcast.net> One question that occurs to me is whether different Smalltalks exhibit different behaviors in switching from one process to another at the same priority. I recall thinking this was a bit odd when I first became aware of it and I seem to remember a discussion once about changing Squeak's behavior in this case. I don't know if other Smalltalks did change or were even different from the very beginning. If you run the following, do the three processes proceed at roughly the same pace or does 1 finish before 2 starts? | nums procs | nums := OrderedCollection new. procs := (1 to: 3) collect: [ : i | nums add: 0. [ 10 timesRepeat: [ [10000 factorial] timeToRun. nums at: i put: (nums at: i) + 1. ]. ]. ]. procs do: [ : e | e forkAt: Processor userBackgroundPriority]. nums inspect On 3/10/15 7:51 AM, Sven Van Caekenberghe wrote: > Well, we can't help him unless he give us a reproducible case. > > My code shows there is no such problem. > > There might be some miscommunication going on, but from my cursory reading, I got the impression that he suggests there is a fundamental problem with something except his own code. > >> On 10 Mar 2015, at 12:31, Nowak, Helge wrote: >> >> Hmm, >> >> I am sure Ondrej understood what was proposed. He mentioned at least twice that the DB connections are NOT the problem. He said that the processing AFTER loading the data from the database into the image is the problem. Why shouldn't I believe him? OTOH I believe you Seaside experts that Seaside's architecture is inherently non-blocking between sessions. >> >> Thus there are two questions: >> - how could any processing block the whole Seaside image? >> - how to find possibly problematic spots in Ondrej's application code? >> >> Once that is resolved one could think about further improvements. >> >> Cheers >> Helge >> >> -----Urspr?ngliche Nachricht----- >> Von: seaside-bounces@lists.squeakfoundation.org [mailto:seaside-bounces@lists.squeakfoundation.org] Im Auftrag von Sven Van Caekenberghe >> Gesendet: Dienstag, 10. M?rz 2015 12:12 >> An: Seaside - general discussion >> Betreff: Re: [Seaside] Re: Concurrent requests from multiple sessions >> >> >>> On 10 Mar 2015, at 11:15, wilwarin wrote: >>> >>> ( I tried Sven's code and it is possible to do another work during >>> waiting, it is OK. ) >> Does it also work (slowly) during the benchmark ? >> That simulates your 'long running work'. >> >>>> But that problem (not being able to process concurrent requests) is >>>> certainly not inherent to Seaside or Pharo. If that were the case we >>>> should all stop using it. >>> Hopefully I understand, so it is not the case. If I am correct, it >>> means that in Seaside it is necessary to solve similar situations with >>> different access. In case of for example difficult server-side >>> calculation (or processing of big amount of data), we have to count on >>> a possible problem with concurrent requests from multiple sessions. Am >>> I right? Or, if not, where could the problem lay? >> What everybody here tries to explain to you is that the problem is most probably in your DB driver (in Smalltalk or further down): it probably cannot do more than one concurrent request (as it is currently implemented). That is not a Seaside nor a fundamental Smalltalk problem. >> >> Try investigating that aspect, separate from Seaside._______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/beaa0566/attachment-0001.htm From sven at stfx.eu Tue Mar 10 13:24:23 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Tue Mar 10 13:24:30 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <54FEE6CD.1000301@comcast.net> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <54FEE6CD.1000301@comcast.net> Message-ID: <99C10AD8-3156-4E5D-80CD-774A93DD1FA1@stfx.eu> Nice test, Bob. In my Pharo 4.0 image the processes seem to be progressing about evenly. > On 10 Mar 2015, at 13:42, Bob Arning wrote: > > | nums procs | > > nums := OrderedCollection new. > procs := (1 to: 3) collect: [ : i | > nums add: 0. > [ > 10 timesRepeat: [ > [10000 factorial] timeToRun. > nums at: i put: (nums at: i) + 1. > ]. > ]. > ]. > procs do: [ : e | e forkAt: Processor userBackgroundPriority]. > nums inspect From Ondrej.Altman at seznam.cz Tue Mar 10 13:25:38 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Tue Mar 10 13:34:46 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> Message-ID: <1425993938100-4810964.post@n4.nabble.com> > I got the impression that he suggests there is a fundamental > problem with something except his own code. Then I have to apologize, it really was not meant to be offensive. I just wanted to know, whether the issue we are facing is standard or not. That's why I was asking for correction of my words. Sorry. > Well, we can't help him unless he give us a reproducible case. In the end I tested a really simple component: Then the link was clicked from two different sessions simultaneously. And now it is the time, when I have to admit I was quite wrong (problem with my code). During first comparisons, the 'getResults' part was called during the rendering (between those two DIVs), and results (in both VAST and Pharo) were like following: --- BTW: --- > Your rendering method is just for painting the current state of your > component, it shouldn?t be concerned with changing that state. So, when somebody does some data processing during the rendering, it will cause this problem? ------------- => Now, after several changes it looks like we still have this problem with a component above only in VAST. -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4810964.html Sent from the Seaside General mailing list archive at Nabble.com. From Lou at Keystone-Software.com Tue Mar 10 13:57:25 2015 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Tue Mar 10 13:57:48 2015 Subject: [Seaside] Concurrent requests from multiple sessions References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> Message-ID: <72ttfadrc8aaih2pbcpjkqpnhvl2efinti@4ax.com> Hi, First be sure you have taken Jan's advice about setting the #AllCallsThreaded preference in AbtDbmSystem to true. Then see if you can drop the priority of a session with a long running task. This can be tricky as you may want to up the priority when the long running task finishes. And/Or you can relinquish the CPU in the middle (or elsewhere) of long running tasks with "Processor yield". It will move on to the next process if and are ready or back to your long running process if it is the only one. Lou On Tue, 10 Mar 2015 03:15:12 -0700 (PDT), wilwarin wrote: >Hi all, > >please excuse my inactivity, now I would like to summarize all above, and to >ask you maybe for a few last answers and advices. > >Regarding to mentioned DB2, as I assumed, database is definitely not an >issue, so I am sorry for my inaccuracy in my first post. At the moment we >are sure that there is no block from the database side (we can see the block >in data processing). Thank you guys for your solution proposals. > > >> The only Seaside limitation I'm aware of is a lock around every >> session. So only one request of 'A' can be processed at any given >> time. However this should not affect any other users. The lock is >> there because sessions and components are mutable. Use the code from >> Sven to verify Seaside and your webserver are not the issue. > >This is the behavior we assumed, this (max. one request per session at any >time) has to be, and actually is, enough. However we are really surprised, >that other users are affected. And by our investigation they are always >affected by every concurrent request, no matter how difficult it is. > >( I tried Sven's code and it is possible to do another work during waiting, >it is OK. ) > > >> But that problem (not being able to process concurrent requests) is >> certainly not inherent to Seaside or Pharo. If that were the case we >> should all stop using it. > >Hopefully I understand, so it is not the case. If I am correct, it means >that in Seaside it is necessary to solve similar situations with different >access. In case of for example difficult server-side calculation (or >processing of big amount of data), we have to count on a possible problem >with concurrent requests from multiple sessions. Am I right? Or, if not, >where could the problem lay? > >As I wrote, we are working in VAST - I tried to simulate the same problem in >Pharo with the same result, so I think in this case it does not matter much. >Regarding to Apache (or, when we run it from code), everything is in default >configuration. Database is not an issue. For me it looks like everything, >that I wrote here, is a standard behavior of application build on Seaside => >the application which has to serve not-so-easy concurrent requests has to >use some way around (multiple images & load balancing, parallelization of >processes, ...). Please correct me if I am wrong. > >Guys, could you please tell me what I am missing? > >Maybe I can imagine, that the application we are developing is not a >'standard' Seaside app (in the sense of data amount and its difficult >server-side processing). Then I believe it would require a non-standard >architecture (according to that all, is Seaside still the path we can/should >follow?). It is our problem, we do not know about a reliable way to do that >- and this is the reason, why I am asking here. > >What would you recommend? > >Thank you again for your time, and thank you for your responses in advance. > >Cheers, >Ondrej. ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com From arning315 at comcast.net Tue Mar 10 15:28:49 2015 From: arning315 at comcast.net (Bob Arning) Date: Tue Mar 10 15:28:52 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1425993938100-4810964.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> Message-ID: <54FF0DB1.6010304@comcast.net> BTW, did you include some code in your message? I didn't see any if you did. On 3/10/15 9:25 AM, wilwarin wrote: >> I got the impression that he suggests there is a fundamental >> problem with something except his own code. > Then I have to apologize, it really was not meant to be offensive. I just > wanted to know, whether the issue we are facing is standard or not. That's > why I was asking for correction of my words. Sorry. > >> Well, we can't help him unless he give us a reproducible case. > In the end I tested a really simple component: > > > > Then the link was clicked from two different sessions simultaneously. And > now it is the time, when I have to admit I was quite wrong (problem with my > code). During first comparisons, the 'getResults' part was called during the > rendering (between those two DIVs), and results (in both VAST and Pharo) > were like following: > > > > --- BTW: --- >> Your rendering method is just for painting the current state of your >> component, it shouldn?t be concerned with changing that state. > So, when somebody does some data processing during the rendering, it will > cause this problem? > ------------- > > => Now, after several changes it looks like we still have this problem with > a component above only in VAST. > > > > -- > View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4810964.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/d69feda6/attachment.htm From sebastian at flowingconcept.com Tue Mar 10 15:57:17 2015 From: sebastian at flowingconcept.com (Sebastian Sastre) Date: Tue Mar 10 15:57:26 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <1425637052640-4809929.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> Message-ID: <6C358155-9F04-466C-9C8E-C28ED125ACE6@flowingconcept.com> Hi Ondrej, are you using an ODBC connection? What comes to mind is to check if maybe the FFI call to ODBC or whatever driver you are using to get into DB2 is blocking the VM running that image until it gets the answer. Whatever the case, you seem to need to scale your app horizonatally with many images. At least that?s how I do it. Other than that, there is something that you probably don?t want to even hear about but for what?s worth: a REST backend and a single page application scales really well due to clients? CPU dividing load and RESTful backends having way better parallelisation sebastian o/ LinkedIn: http://www.linkedin.com/in/sebastiansastre github: https://github.com/sebastianconcept > On Mar 6, 2015, at 7:17 AM, wilwarin wrote: > > Hi all, > > Currently we are developing a web application in Seaside, and it is > necessary for us to work in VAST. The application runs as a Windows service, > and for a few days we are facing the following issue: > > - At one moment there are two users (let's call them 'A' and 'B') logged in > in the application, so we have two different sessions. > - 'A' requests a page with a long list of objects obtained from DB2, so it > takes a number of seconds to get the results. > - Less than one second after 'A''s request, 'B' requests another page, for > instance an easy static page. > - For the time the 'A''s request is handled, the 'B''s browser window > freezes and waits for those number of seconds mentioned above. > > We searched really a lot, but still the results are not what we would > expect. This issue makes as confused, because in the future the application > should serve hundreds of users with very similar combinations of requests. > > We didn't know, where our problem lies, so we tried a similar test with a > single page with a difficult calculation inside. Then we tried the same in > Pharo to exclude the problem in VAST. Both with the same results. > > Is there anything we are missing? What should we do to achieve a parallel > (or kinda better) processing of requests? > > Thank you very much for your responses. > > Ondrej > > > > -- > View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/d6b5e107/attachment-0001.htm From sm at planage.com Tue Mar 10 16:10:46 2015 From: sm at planage.com (Sanjay Minni) Date: Tue Mar 10 16:19:54 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: <1425979111011-4810872.post@n4.nabble.com> References: <1425979111011-4810872.post@n4.nabble.com> Message-ID: <1426003846891-4811056.post@n4.nabble.com> Hi I thought this problem must already have a solution ... fairly commonplace in a screen with multiple form areas - say master/detail or matrix like - if the user moves between areas and clicks a submitButton attached to a form then there is some data / state loss in the other form - so how can that be saved also somewhat related - How can i trap the event lose focus or when i move out of a field regards Sanjay Sanjay Minni wrote > Hi, > > How can save data in a form other than the one in which the submitbutton > is clicked ? > > the page on www.uxfin.com contains 3 separate forms (separated by > horizontal rules). Users may typically leave midway while entering data in > the top form and click a submit button on any of the 2 lower forms. At > that time the last value entered is not captured. > > How can I force this programmatically > > Thanks > Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html Sent from the Seaside General mailing list archive at Nabble.com. From sven at stfx.eu Tue Mar 10 16:24:03 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Tue Mar 10 16:24:08 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: <1426003846891-4811056.post@n4.nabble.com> References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> Message-ID: I believe there can only be one form on a page. This is discussed in the main book. > On 10 Mar 2015, at 17:10, Sanjay Minni wrote: > > Hi > > I thought this problem must already have a solution ... fairly commonplace > > in a screen with multiple form areas - say master/detail or matrix like - if > the user moves between areas and clicks a submitButton attached to a form > then there is some data / state loss in the other form - so how can that be > saved > > also somewhat related - How can i trap the event lose focus or when i move > out of a field > > regards > Sanjay > > > > Sanjay Minni wrote >> Hi, >> >> How can save data in a form other than the one in which the submitbutton >> is clicked ? >> >> the page on www.uxfin.com contains 3 separate forms (separated by >> horizontal rules). Users may typically leave midway while entering data in >> the top form and click a submit button on any of the 2 lower forms. At >> that time the last value entered is not captured. >> >> How can I force this programmatically >> >> Thanks >> Sanjay > > > > > > ----- > --- > Regards, Sanjay > -- > View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From sm at planage.com Tue Mar 10 16:23:19 2015 From: sm at planage.com (Sanjay Minni) Date: Tue Mar 10 16:32:26 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> Message-ID: <1426004599837-4811063.post@n4.nabble.com> >From book.seaside.st section 10.2 end ... I assumed this meant that there can be multiple forms on a page "[...],. Typically only a single form tag is needed on a page. form tags must not be nested but multiple form tags can occur, one after another, on a single page. Only the contents of a single form will be submitted by the web browser though (normally determined by the form in which the user clicked a submit button)." regards Sanjay Sven Van Caekenberghe-2 wrote > I believe there can only be one form on a page. > > This is discussed in the main book. > >> On 10 Mar 2015, at 17:10, Sanjay Minni < > sm@ > > wrote: >> >> Hi >> >> I thought this problem must already have a solution ... fairly >> commonplace >> >> in a screen with multiple form areas - say master/detail or matrix like - >> if >> the user moves between areas and clicks a submitButton attached to a form >> then there is some data / state loss in the other form - so how can that >> be >> saved >> >> also somewhat related - How can i trap the event lose focus or when i >> move >> out of a field >> >> regards >> Sanjay >> >> >> >> Sanjay Minni wrote >>> Hi, >>> >>> How can save data in a form other than the one in which the submitbutton >>> is clicked ? >>> >>> the page on www.uxfin.com contains 3 separate forms (separated by >>> horizontal rules). Users may typically leave midway while entering data >>> in >>> the top form and click a submit button on any of the 2 lower forms. At >>> that time the last value entered is not captured. >>> >>> How can I force this programmatically >>> >>> Thanks >>> Sanjay >> >> >> >> >> >> ----- >> --- >> Regards, Sanjay >> -- >> View this message in context: >> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811063.html Sent from the Seaside General mailing list archive at Nabble.com. From sven at stfx.eu Tue Mar 10 16:33:56 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Tue Mar 10 16:34:01 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: <1426004599837-4811063.post@n4.nabble.com> References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> <1426004599837-4811063.post@n4.nabble.com> Message-ID: <467EF49E-FF4C-4FE7-B9FD-527DB327E1A4@stfx.eu> if you use multiple, the contents of the others is lost, very logical/normal > On 10 Mar 2015, at 17:23, Sanjay Minni wrote: > >> >> From book.seaside.st section 10.2 end ... > > I assumed this meant that there can be multiple forms on a page > > "[...],. Typically only a single form tag is needed on a page. form tags > must not be nested but multiple form tags can occur, one after another, on a > single page. Only the contents of a single form will be submitted by the web > browser though (normally determined by the form in which the user clicked a > submit button)." > > regards > Sanjay > > > Sven Van Caekenberghe-2 wrote >> I believe there can only be one form on a page. >> >> This is discussed in the main book. >> >>> On 10 Mar 2015, at 17:10, Sanjay Minni < > >> sm@ > >> > wrote: >>> >>> Hi >>> >>> I thought this problem must already have a solution ... fairly >>> commonplace >>> >>> in a screen with multiple form areas - say master/detail or matrix like - >>> if >>> the user moves between areas and clicks a submitButton attached to a form >>> then there is some data / state loss in the other form - so how can that >>> be >>> saved >>> >>> also somewhat related - How can i trap the event lose focus or when i >>> move >>> out of a field >>> >>> regards >>> Sanjay >>> >>> >>> >>> Sanjay Minni wrote >>>> Hi, >>>> >>>> How can save data in a form other than the one in which the submitbutton >>>> is clicked ? >>>> >>>> the page on www.uxfin.com contains 3 separate forms (separated by >>>> horizontal rules). Users may typically leave midway while entering data >>>> in >>>> the top form and click a submit button on any of the 2 lower forms. At >>>> that time the last value entered is not captured. >>>> >>>> How can I force this programmatically >>>> >>>> Thanks >>>> Sanjay >>> >>> >>> >>> >>> >>> ----- >>> --- >>> Regards, Sanjay >>> -- >>> View this message in context: >>> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html >>> Sent from the Seaside General mailing list archive at Nabble.com. >>> _______________________________________________ >>> seaside mailing list >>> > >> seaside@.squeakfoundation > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > ----- > --- > Regards, Sanjay > -- > View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811063.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From sm at planage.com Tue Mar 10 17:24:07 2015 From: sm at planage.com (Sanjay Minni) Date: Tue Mar 10 17:33:16 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: <467EF49E-FF4C-4FE7-B9FD-527DB327E1A4@stfx.eu> References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> <1426004599837-4811063.post@n4.nabble.com> <467EF49E-FF4C-4FE7-B9FD-527DB327E1A4@stfx.eu> Message-ID: Well it may be logical but at this time I am looking for a solution / workaround --- Sanjay Minni +91 9900 902902 On 10 Mar 2015 22:04, "Sven Van Caekenberghe-2 [via Smalltalk]" < ml-node+s1294792n4811067h81@n4.nabble.com> wrote: > if you use multiple, the contents of the others is lost, very > logical/normal > > > On 10 Mar 2015, at 17:23, Sanjay Minni <[hidden email] > > wrote: > > > >> > >> From book.seaside.st section 10.2 end ... > > > > I assumed this meant that there can be multiple forms on a page > > > > "[...],. Typically only a single form tag is needed on a page. form > tags > > must not be nested but multiple form tags can occur, one after another, > on a > > single page. Only the contents of a single form will be submitted by the > web > > browser though (normally determined by the form in which the user > clicked a > > submit button)." > > > > regards > > Sanjay > > > > > > Sven Van Caekenberghe-2 wrote > >> I believe there can only be one form on a page. > >> > >> This is discussed in the main book. > >> > >>> On 10 Mar 2015, at 17:10, Sanjay Minni < > > > >> sm@ > > > >> > wrote: > >>> > >>> Hi > >>> > >>> I thought this problem must already have a solution ... fairly > >>> commonplace > >>> > >>> in a screen with multiple form areas - say master/detail or matrix > like - > >>> if > >>> the user moves between areas and clicks a submitButton attached to a > form > >>> then there is some data / state loss in the other form - so how can > that > >>> be > >>> saved > >>> > >>> also somewhat related - How can i trap the event lose focus or when i > >>> move > >>> out of a field > >>> > >>> regards > >>> Sanjay > >>> > >>> > >>> > >>> Sanjay Minni wrote > >>>> Hi, > >>>> > >>>> How can save data in a form other than the one in which the > submitbutton > >>>> is clicked ? > >>>> > >>>> the page on www.uxfin.com contains 3 separate forms (separated by > >>>> horizontal rules). Users may typically leave midway while entering > data > >>>> in > >>>> the top form and click a submit button on any of the 2 lower forms. > At > >>>> that time the last value entered is not captured. > >>>> > >>>> How can I force this programmatically > >>>> > >>>> Thanks > >>>> Sanjay > >>> > >>> > >>> > >>> > >>> > >>> ----- > >>> --- > >>> Regards, Sanjay > >>> -- > >>> View this message in context: > >>> > http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html > >>> Sent from the Seaside General mailing list archive at Nabble.com. > >>> _______________________________________________ > >>> seaside mailing list > >>> > > > >> seaside@.squeakfoundation > > > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >> > >> _______________________________________________ > >> seaside mailing list > > > >> seaside@.squeakfoundation > > > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > ----- > > --- > > Regards, Sanjay > > -- > > View this message in context: > http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811063.html > > Sent from the Seaside General mailing list archive at Nabble.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 > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811067.html > To unsubscribe from Triggerring save / submit of another form, click here > > . > NAML > > ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811081.html Sent from the Seaside General mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/2de61b34/attachment-0001.htm From sven at stfx.eu Tue Mar 10 17:59:01 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Tue Mar 10 17:59:08 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> <1426004599837-4811063.post@n4.nabble.com> <467EF49E-FF4C-4FE7-B9FD-527DB327E1A4@stfx.eu> Message-ID: <5A233273-F7C1-4F90-9B11-73F8E76A7402@stfx.eu> one form tag across all inputs > On 10 Mar 2015, at 18:24, Sanjay Minni wrote: > > Well it may be logical but at this time I am looking for a solution / workaround > > --- > Sanjay Minni > +91 9900 902902 > > On 10 Mar 2015 22:04, "Sven Van Caekenberghe-2 [via Smalltalk]" <[hidden email]> wrote: > if you use multiple, the contents of the others is lost, very logical/normal > > > On 10 Mar 2015, at 17:23, Sanjay Minni <[hidden email]> wrote: > > > >> > >> From book.seaside.st section 10.2 end ... > > > > I assumed this meant that there can be multiple forms on a page > > > > "[...],. Typically only a single form tag is needed on a page. form tags > > must not be nested but multiple form tags can occur, one after another, on a > > single page. Only the contents of a single form will be submitted by the web > > browser though (normally determined by the form in which the user clicked a > > submit button)." > > > > regards > > Sanjay > > > > > > Sven Van Caekenberghe-2 wrote > >> I believe there can only be one form on a page. > >> > >> This is discussed in the main book. > >> > >>> On 10 Mar 2015, at 17:10, Sanjay Minni < > > > >> sm@ > > > >> > wrote: > >>> > >>> Hi > >>> > >>> I thought this problem must already have a solution ... fairly > >>> commonplace > >>> > >>> in a screen with multiple form areas - say master/detail or matrix like - > >>> if > >>> the user moves between areas and clicks a submitButton attached to a form > >>> then there is some data / state loss in the other form - so how can that > >>> be > >>> saved > >>> > >>> also somewhat related - How can i trap the event lose focus or when i > >>> move > >>> out of a field > >>> > >>> regards > >>> Sanjay > >>> > >>> > >>> > >>> Sanjay Minni wrote > >>>> Hi, > >>>> > >>>> How can save data in a form other than the one in which the submitbutton > >>>> is clicked ? > >>>> > >>>> the page on www.uxfin.com contains 3 separate forms (separated by > >>>> horizontal rules). Users may typically leave midway while entering data > >>>> in > >>>> the top form and click a submit button on any of the 2 lower forms. At > >>>> that time the last value entered is not captured. > >>>> > >>>> How can I force this programmatically > >>>> > >>>> Thanks > >>>> Sanjay > >>> > >>> > >>> > >>> > >>> > >>> ----- > >>> --- > >>> Regards, Sanjay > >>> -- > >>> View this message in context: > >>> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html > >>> Sent from the Seaside General mailing list archive at Nabble.com. > >>> _______________________________________________ > >>> seaside mailing list > >>> > > > >> seaside@.squeakfoundation > > > >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > >> > >> _______________________________________________ > >> seaside mailing list > > > >> seaside@.squeakfoundation > > > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > > > > > > > ----- > > --- > > Regards, Sanjay > > -- > > View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811063.html > > Sent from the Seaside General mailing list archive at Nabble.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 > > > If you reply to this email, your message will be added to the discussion below: > http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811067.html > To unsubscribe from Triggerring save / submit of another form, click here. > NAML > --- > Regards, Sanjay > > View this message in context: Re: Triggerring save / submit of another form > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From bstjean at yahoo.com Tue Mar 10 16:21:39 2015 From: bstjean at yahoo.com (Benoit St-Jean) Date: Tue Mar 10 19:29:04 2015 Subject: [Seaside] Concurrent requests from multiple sessions In-Reply-To: <6C358155-9F04-466C-9C8E-C28ED125ACE6@flowingconcept.com> References: <6C358155-9F04-466C-9C8E-C28ED125ACE6@flowingconcept.com> Message-ID: <158927325.2749143.1426004499675.JavaMail.yahoo@mail.yahoo.com> One more thing to check : could it be possible that your query is getting blocked because of lock escalation?? Which isolation level are you using? ?----------------- Benoit St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".? (A. Einstein) From: Sebastian Sastre To: Seaside - general discussion Sent: Tuesday, March 10, 2015 11:57 AM Subject: Re: [Seaside] Concurrent requests from multiple sessions Hi Ondrej, are you using an ODBC connection? What comes to mind is to check if maybe the FFI call to ODBC or whatever driver you are using to get into DB2 is blocking the VM running that image until it gets the answer. Whatever the case, you seem to need to scale your app horizonatally with many images. At least that?s how I do it. Other than that, there is something that you probably don?t want to even hear about but for what?s worth: a REST backend and a single page application scales really well due to clients? CPU dividing load and RESTful backends having way better parallelisation sebastian o/ LinkedIn:?http://www.linkedin.com/in/sebastiansastregithub:?https://github.com/sebastianconcept On Mar 6, 2015, at 7:17 AM, wilwarin wrote: Hi all, Currently we are developing a web application in Seaside, and it is necessary for us to work in VAST. The application runs as a Windows service, and for a few days we are facing the following issue: - At one moment there are two users (let's call them 'A' and 'B') logged in in the application, so we have two different sessions. - 'A' requests a page with a long list of objects obtained from DB2, so it takes a number of seconds to get the results. - Less than one second after 'A''s request, 'B' requests another page, for instance an easy static page. - For the time the 'A''s request is handled, the 'B''s browser window freezes and waits for those number of seconds mentioned above. We searched really a lot, but still the results are not what we would expect. This issue makes as confused, because in the future the application should serve hundreds of users with very similar combinations of requests. We didn't know, where our problem lies, so we tried a similar test with a single page with a difficult calculation inside. Then we tried the same in Pharo to exclude the problem in VAST. Both with the same results. Is there anything we are missing? What should we do to achieve a parallel (or kinda better) processing of requests? Thank you very much for your responses. Ondrej -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929.html Sent from the Seaside General mailing list archive at Nabble.com. _______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/cf1c66c8/attachment.htm From pdebruic at gmail.com Tue Mar 10 20:14:11 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Tue Mar 10 20:23:23 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> <1426004599837-4811063.post@n4.nabble.com> <467EF49E-FF4C-4FE7-B9FD-527DB327E1A4@stfx.eu> Message-ID: <1426018451668-4811110.post@n4.nabble.com> You could prevent the default action of the submit button and then use javascript to serialize the forms. Look at the JQAjax>>#serializeForm: message. I don't know how/whether it would work with multiple forms but I'd guess it would work fine if you gave every form you wanted to serialize the same class and did a html button bePush onClick:(html jQuery ajax serializeForm:(html jQuery class: 'myFormCssClass'); with:'submit all forms'. Another approach would be to serialize the form inputs when the user changes them by adding an onChange: method to the input. Then when they click any of the buttons determine what processing & view updating needs to be done based on what changed and do it. Another approach might be to make it all one form, remove the intermediate buttons, and just have the one button and the big form that's broken up visually how you have the multiple forms now. Whats the point of 7 forms when its really just 1 sometimes? Hope this helps Sanjay Minni wrote > Well it may be logical but at this time I am looking for a solution / > workaround > > --- > Sanjay Minni > +91 9900 902902 > On 10 Mar 2015 22:04, "Sven Van Caekenberghe-2 [via Smalltalk]" < > ml-node+s1294792n4811067h81@.nabble >> wrote: > >> if you use multiple, the contents of the others is lost, very >> logical/normal >> >> > On 10 Mar 2015, at 17:23, Sanjay Minni <[hidden email] >> <http:///user/SendEmail.jtp?type=node&node=4811067&i=0>> >> wrote: >> > >> >> >> >> From book.seaside.st section 10.2 end ... >> > >> > I assumed this meant that there can be multiple forms on a page >> > >> > "[...],. Typically only a single form tag is needed on a page. form >> tags >> > must not be nested but multiple form tags can occur, one after another, >> on a >> > single page. Only the contents of a single form will be submitted by >> the >> web >> > browser though (normally determined by the form in which the user >> clicked a >> > submit button)." >> > >> > regards >> > Sanjay >> > >> > >> > Sven Van Caekenberghe-2 wrote >> >> I believe there can only be one form on a page. >> >> >> >> This is discussed in the main book. >> >> >> >>> On 10 Mar 2015, at 17:10, Sanjay Minni < >> > >> >> sm@ >> > >> >> > wrote: >> >>> >> >>> Hi >> >>> >> >>> I thought this problem must already have a solution ... fairly >> >>> commonplace >> >>> >> >>> in a screen with multiple form areas - say master/detail or matrix >> like - >> >>> if >> >>> the user moves between areas and clicks a submitButton attached to a >> form >> >>> then there is some data / state loss in the other form - so how can >> that >> >>> be >> >>> saved >> >>> >> >>> also somewhat related - How can i trap the event lose focus or when i >> >>> move >> >>> out of a field >> >>> >> >>> regards >> >>> Sanjay >> >>> >> >>> >> >>> >> >>> Sanjay Minni wrote >> >>>> Hi, >> >>>> >> >>>> How can save data in a form other than the one in which the >> submitbutton >> >>>> is clicked ? >> >>>> >> >>>> the page on www.uxfin.com contains 3 separate forms (separated by >> >>>> horizontal rules). Users may typically leave midway while entering >> data >> >>>> in >> >>>> the top form and click a submit button on any of the 2 lower forms. >> At >> >>>> that time the last value entered is not captured. >> >>>> >> >>>> How can I force this programmatically >> >>>> >> >>>> Thanks >> >>>> Sanjay >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> ----- >> >>> --- >> >>> Regards, Sanjay >> >>> -- >> >>> View this message in context: >> >>> >> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html >> >>> Sent from the Seaside General mailing list archive at Nabble.com. >> >>> _______________________________________________ >> >>> seaside mailing list >> >>> >> > >> >> seaside@.squeakfoundation >> > >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> >> _______________________________________________ >> >> seaside mailing list >> > >> >> seaside@.squeakfoundation >> > >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > >> > >> > >> > >> > >> > ----- >> > --- >> > Regards, Sanjay >> > -- >> > View this message in context: >> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811063.html >> > Sent from the Seaside General mailing list archive at Nabble.com. >> > _______________________________________________ >> > seaside mailing list >> > [hidden email] >> <http:///user/SendEmail.jtp?type=node&node=4811067&i=1> >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> <http:///user/SendEmail.jtp?type=node&node=4811067&i=2> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811067.html >> To unsubscribe from Triggerring save / submit of another form, click >> here >> <http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4810872&code=c21AcGxhbmFnZS5jb218NDgxMDg3MnwtMTY0MTAzMTYyMw==> >> . >> NAML >> <http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> -- View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811110.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Tue Mar 10 22:03:57 2015 From: johan at inceptive.be (Johan Brichau) Date: Tue Mar 10 22:03:51 2015 Subject: [Seaside] %2B instead of spaces In-Reply-To: References: <54FA16BF.6090307@comcast.net> Message-ID: Can you check which adaptor and which versions of the concerned packages you are using? If we can reconstruct the issue with a code sample, we can see what is happening. Johan > On 07 Mar 2015, at 00:28, Laura Risani wrote: > > Hi, > > Tried changing app charset but didn't change a thing. > Perhaps it has something to do with the adaptor i'm using, changes i made. > Yet retrieving the textArea value through a script gives the right text, so i'll do that it until the case i found another solution. > > Best, > Laura > > On Fri, Mar 6, 2015 at 6:14 PM, Tobias Pape > wrote: > Hi, > > On 06.03.2015, at 22:06, Bob Arning > wrote: > > > Well, %2B is the "+", so it's not even what you entered, encoded or not. I did notice you were having some issues related to encoding a few days ago. Could those have something to do with this problem? > > This could be a double encoding problem: > in Form-urlencoded requests, a space can be represented by a + [1] > but apparently, the + then got urlencoded itself. > > note the + is a space only in the _query_ of the request. > > Best > -Tobias > > > > [1] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 > > > > > On 3/6/15 1:52 PM, Laura Risani wrote: > >> Hi all, > >> > >> Having rendered this > >> > >> html textArea callback: [ :value | self actionWith: value ]; ... > >> > >> When the callback is processed the value argument has all white spaces (inputed pressing the space key) replaced by '%2B'. > >> > >> Should i change them manually or there is another way to fix it? > >> > >> I'm not sure this happened before i removed development tools sending > >> > >> WAAdmin applicationDefaults > >> removeParent: WADevelopmentConfiguration instance. > >> > >> > >> Love, > >> Laura > >> > >> > >> _______________________________________________ > >> seaside mailing list > >> > >> seaside@lists.squeakfoundation.org > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/676d478c/attachment.htm From laura.risani at gmail.com Wed Mar 11 02:12:44 2015 From: laura.risani at gmail.com (Laura Risani) Date: Wed Mar 11 02:12:46 2015 Subject: [Seaside] Re: Free hosting a Seaside app? In-Reply-To: <1425983465823-4810879.post@n4.nabble.com> References: <20150308201846.GA23605@shell.msen.com> <1425983465823-4810879.post@n4.nabble.com> Message-ID: Very interesting indeed! On Tue, Mar 10, 2015 at 7:31 AM, Sanjay Minni wrote: > Hi Laura, > > I am using pharocloud.com for an experimental website uxfin.com > > it has a basic plan of $2 a month ... and Mike's support is excellent > > You can give it a shot > > regards > Sanjay > > > > ----- > --- > Regards, Sanjay > -- > View this message in context: > http://forum.world.st/Free-hosting-a-Seaside-app-tp4810478p4810879.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150310/18b8f716/attachment.htm From laura.risani at gmail.com Wed Mar 11 03:15:19 2015 From: laura.risani at gmail.com (Laura Risani) Date: Wed Mar 11 03:15:21 2015 Subject: [Seaside] %2B instead of spaces In-Reply-To: References: <54FA16BF.6090307@comcast.net> Message-ID: Thank you for your offering, but just found the solution. It was an enconding problem after all. On Tue, Mar 10, 2015 at 7:03 PM, Johan Brichau wrote: > Can you check which adaptor and which versions of the concerned packages > you are using? > If we can reconstruct the issue with a code sample, we can see what is > happening. > > Johan > > On 07 Mar 2015, at 00:28, Laura Risani wrote: > > Hi, > > Tried changing app charset but didn't change a thing. > Perhaps it has something to do with the adaptor i'm using, changes i made. > Yet retrieving the textArea value through a script gives the right text, > so i'll do that it until the case i found another solution. > > Best, > Laura > > On Fri, Mar 6, 2015 at 6:14 PM, Tobias Pape wrote: > >> Hi, >> >> On 06.03.2015, at 22:06, Bob Arning wrote: >> >> > Well, %2B is the "+", so it's not even what you entered, encoded or >> not. I did notice you were having some issues related to encoding a few >> days ago. Could those have something to do with this problem? >> >> This could be a double encoding problem: >> in Form-urlencoded requests, a space can be represented by a + [1] >> but apparently, the + then got urlencoded itself. >> >> note the + is a space only in the _query_ of the request. >> >> Best >> -Tobias >> >> >> >> [1] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 >> >> > >> > On 3/6/15 1:52 PM, Laura Risani wrote: >> >> Hi all, >> >> >> >> Having rendered this >> >> >> >> html textArea callback: [ :value | self actionWith: value ]; ... >> >> >> >> When the callback is processed the value argument has all white spaces >> (inputed pressing the space key) replaced by '%2B'. >> >> >> >> Should i change them manually or there is another way to fix it? >> >> >> >> I'm not sure this happened before i removed development tools sending >> >> >> >> WAAdmin applicationDefaults >> >> removeParent: WADevelopmentConfiguration instance. >> >> >> >> >> >> Love, >> >> Laura >> >> >> >> >> >> _______________________________________________ >> >> seaside mailing list >> >> >> >> seaside@lists.squeakfoundation.org >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > >> > _______________________________________________ >> > seaside mailing list >> > seaside@lists.squeakfoundation.org >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150311/a60dc4d2/attachment.htm From Ondrej.Altman at seznam.cz Wed Mar 11 06:36:03 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Wed Mar 11 06:45:17 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <54FF0DB1.6010304@comcast.net> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> Message-ID: <1426055763450-4811143.post@n4.nabble.com> Hi Bob, > BTW, did you include some code in your message? I didn't see any if you > did. yes I did. Sorry, I made it a raw text and didn't know somebody won't be able to see it. Let me share the code once more (no DB call inside): 1) getResult | result | startTime := Time now asString. result := "". finishTime := Time now asString. ^ result. 2) renderContentOn: html html div: [ html anchor callback: [ self getResult. ]; with: 'Click me!'. ]. html div: 'Start: ', startTime. html div: 'Finish: ', finishTime. Guys, I really appreciate ideas you share. Thank you. Cheers. Ondrej -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811143.html Sent from the Seaside General mailing list archive at Nabble.com. From philippe.marschall at gmail.com Wed Mar 11 07:13:00 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Wed Mar 11 07:13:03 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> Message-ID: On Tue, Mar 10, 2015 at 12:31 PM, Nowak, Helge wrote: > Hmm, > > I am sure Ondrej understood what was proposed. He mentioned at least twice that the DB connections are NOT the problem. He said that the processing AFTER loading the data from the database into the image is the problem. Why shouldn't I believe him? OTOH I believe you Seaside experts that Seaside's architecture is inherently non-blocking between sessions. > > Thus there are two questions: > - how could any processing block the whole Seaside image? #valueUnpreemptively? Certain C call outs? Cheers Philippe From philippe.marschall at gmail.com Wed Mar 11 07:19:11 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Wed Mar 11 07:19:14 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1425993938100-4810964.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> Message-ID: On Tue, Mar 10, 2015 at 2:25 PM, wilwarin wrote: > --- BTW: --- >> Your rendering method is just for painting the current state of your >> component, it shouldn?t be concerned with changing that state. > > So, when somebody does some data processing during the rendering, it will > cause this problem? > ------------- You shouldn't change component state in the render phase, you should change component state only in the callback phase. Doing database access for display in the render phase is fine from a Seaside perspective. Cheers Philippe From johan at inceptive.be Wed Mar 11 08:01:51 2015 From: johan at inceptive.be (Johan Brichau) Date: Wed Mar 11 08:01:44 2015 Subject: [Seaside] %2B instead of spaces In-Reply-To: References: <54FA16BF.6090307@comcast.net> Message-ID: <79CFCDE2-AC2F-4D11-BD7B-13159ABCFF50@inceptive.be> I?m sure it is, but you should never get an issue with that in a Seaside callback. Seaside takes care of encodings so you should not. So, if there is an issue somewhere, we would like to know so you do not have to work around it. If it was something in your code, then I?m glad you fixed it. cheers Johan > On 11 Mar 2015, at 04:15, Laura Risani wrote: > > Thank you for your offering, but just found the solution. > It was an enconding problem after all. > > > On Tue, Mar 10, 2015 at 7:03 PM, Johan Brichau > wrote: > Can you check which adaptor and which versions of the concerned packages you are using? > If we can reconstruct the issue with a code sample, we can see what is happening. > > Johan > >> On 07 Mar 2015, at 00:28, Laura Risani > wrote: >> >> Hi, >> >> Tried changing app charset but didn't change a thing. >> Perhaps it has something to do with the adaptor i'm using, changes i made. >> Yet retrieving the textArea value through a script gives the right text, so i'll do that it until the case i found another solution. >> >> Best, >> Laura >> >> On Fri, Mar 6, 2015 at 6:14 PM, Tobias Pape > wrote: >> Hi, >> >> On 06.03.2015, at 22:06, Bob Arning > wrote: >> >> > Well, %2B is the "+", so it's not even what you entered, encoded or not. I did notice you were having some issues related to encoding a few days ago. Could those have something to do with this problem? >> >> This could be a double encoding problem: >> in Form-urlencoded requests, a space can be represented by a + [1] >> but apparently, the + then got urlencoded itself. >> >> note the + is a space only in the _query_ of the request. >> >> Best >> -Tobias >> >> >> >> [1] http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 >> >> > >> > On 3/6/15 1:52 PM, Laura Risani wrote: >> >> Hi all, >> >> >> >> Having rendered this >> >> >> >> html textArea callback: [ :value | self actionWith: value ]; ... >> >> >> >> When the callback is processed the value argument has all white spaces (inputed pressing the space key) replaced by '%2B'. >> >> >> >> Should i change them manually or there is another way to fix it? >> >> >> >> I'm not sure this happened before i removed development tools sending >> >> >> >> WAAdmin applicationDefaults >> >> removeParent: WADevelopmentConfiguration instance. >> >> >> >> >> >> Love, >> >> Laura >> >> >> >> >> >> _______________________________________________ >> >> seaside mailing list >> >> >> >> seaside@lists.squeakfoundation.org >> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > >> > _______________________________________________ >> > seaside mailing list >> > seaside@lists.squeakfoundation.org >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150311/31d6aee1/attachment.htm From sm at planage.com Wed Mar 11 09:59:48 2015 From: sm at planage.com (Sanjay Minni) Date: Wed Mar 11 10:09:02 2015 Subject: [Seaside] Re: Triggerring save / submit of another form In-Reply-To: <1426018451668-4811110.post@n4.nabble.com> References: <1425979111011-4810872.post@n4.nabble.com> <1426003846891-4811056.post@n4.nabble.com> <1426004599837-4811063.post@n4.nabble.com> <467EF49E-FF4C-4FE7-B9FD-527DB327E1A4@stfx.eu> <1426018451668-4811110.post@n4.nabble.com> Message-ID: <1426067988436-4811185.post@n4.nabble.com> Thanks Sven, Paul well I have taken the easy way out as of now - put them all in one form (tag) regards Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811185.html Sent from the Seaside General mailing list archive at Nabble.com. From arning315 at comcast.net Wed Mar 11 12:40:27 2015 From: arning315 at comcast.net (Bob Arning) Date: Wed Mar 11 12:40:30 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1426055763450-4811143.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> Message-ID: <550037BB.3010207@comcast.net> So, did your previous message indicate that this was still causing a problem in VAST? And the problem is when your "DO SOME MATH" is running, other requests to Seaside are not processed quickly/at all? I've written your example as a single method (best way IMO to share a problem - if at all possible) and tested it in Squeak Seaside. When the "DO SOME MATH" is running, processing of other request to Seaside are delayed, perhaps as much as 1 second. How does this compare to your experience in VAST and Pharo? renderContentOn: html | t0 | html div: [ html anchor callback: [ "self getResult." startTime := Time now asString. "". t0 := Time millisecondClockValue. [(t0 - Time millisecondClockValue) abs < 30000] whileTrue. finishTime := Time now asString. ]; with: 'Click me!'. ]. html div: 'Start: ', startTime. html div: 'Finish: ', finishTime. On 3/11/15 2:36 AM, wilwarin wrote: > Hi Bob, > >> BTW, did you include some code in your message? I didn't see any if you >> did. > yes I did. Sorry, I made it a raw text and didn't know somebody won't be > able to see it. Let me share the code once more (no DB call inside): > > 1) getResult > > | result | > > startTime := Time now asString. > result := "". > finishTime := Time now asString. > > ^ result. > > 2) renderContentOn: html > > html div: [ > html anchor > callback: [ self getResult. ]; > with: 'Click me!'. > ]. > > html div: 'Start: ', startTime. > html div: 'Finish: ', finishTime. > > Guys, I really appreciate ideas you share. Thank you. > > Cheers. > Ondrej > > > > -- > View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811143.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150311/188831cf/attachment-0001.htm From Ondrej.Altman at seznam.cz Wed Mar 11 12:54:54 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Wed Mar 11 13:04:09 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <550037BB.3010207@comcast.net> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> <550037BB.3010207@comcast.net> Message-ID: <1426078494720-4811195.post@n4.nabble.com> Thank you very much, Bob. > So, did your previous message indicate that this was still causing > a problem in VAST? And the problem is when your "DO SOME MATH" > is running, other requests to Seaside are not processed quickly/at all? Yes, exactly. They are not processed at all. > How does this compare to your experience in VAST and Pharo? In case of Pharo, my experience is similar with yours (cca. 1 second delay). In case of VAST, I can see the time of start of the second request is equal to the time of finish of the first one. -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811195.html Sent from the Seaside General mailing list archive at Nabble.com. From arning315 at comcast.net Wed Mar 11 13:17:56 2015 From: arning315 at comcast.net (Bob Arning) Date: Wed Mar 11 13:17:59 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1426078494720-4811195.post@n4.nabble.com> References: <1425637052640-4809929.post@n4.nabble.com> <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> <550037BB.3010207@comcast.net> <1426078494720-4811195.post@n4.nabble.com> Message-ID: <55004084.9030803@comcast.net> So, it would be interesting to run a version of something I posted yesterday: | nums procs big | nums := OrderedCollection new. big := OrderedCollection new. procs := (1 to: 3) collect: [ : i | nums add: 0. [ 10 timesRepeat: [ [10000 factorial] timeToRun. nums at: i put: (nums at: i) + 1. big add: nums asArray asString,' ',Time now asString. ]. ]. ]. procs do: [ : e | e forkAt: Processor userBackgroundPriority]. big inspect Three processes at the same priority - on Squeak and Pharo, time gets shared between the three somewhat equally. What happens in VAST? contents of "big" in Squeak: (0 0 1) 9:11:58.022 am (0 1 1) 9:11:58.053 am (1 1 1) 9:11:58.388 am (1 1 2) 9:11:58.974 am (2 1 2) 9:11:59.06 am (2 2 2) 9:11:59.078 am (2 2 3) 9:11:59.71 am (3 2 3) 9:12:00.044 am (3 3 3) 9:12:00.06 am (3 3 4) 9:12:00.625 am (4 3 4) 9:12:00.663 am (4 4 4) 9:12:00.739 am (5 4 4) 9:12:01.274 am (5 4 5) 9:12:01.57 am (5 5 5) 9:12:01.657 am (5 5 6) 9:12:02.135 am (6 5 6) 9:12:02.216 am (6 6 6) 9:12:02.252 am (6 7 6) 9:12:02.88 am (6 7 7) 9:12:03.436 am (7 7 7) 9:12:03.575 am (7 8 7) 9:12:03.66 am (7 8 8) 9:12:04.082 am (8 8 8) 9:12:04.158 am (8 9 8) 9:12:04.237 am (8 9 9) 9:12:04.975 am (9 9 9) 9:12:05.104 am (9 10 9) 9:12:05.127 am (9 10 10) 9:12:05.457 am (10 10 10) 9:12:05.472 am On 3/11/15 8:54 AM, wilwarin wrote: > Thank you very much, Bob. > >> So, did your previous message indicate that this was still causing >> a problem in VAST? And the problem is when your "DO SOME MATH" >> is running, other requests to Seaside are not processed quickly/at all? > Yes, exactly. They are not processed at all. > >> How does this compare to your experience in VAST and Pharo? > In case of Pharo, my experience is similar with yours (cca. 1 second delay). > In case of VAST, I can see the time of start of the second request is equal > to the time of finish of the first one. > > > > > > -- > View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811195.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150311/11e2536c/attachment.htm From Ondrej.Altman at seznam.cz Wed Mar 11 13:36:12 2015 From: Ondrej.Altman at seznam.cz (wilwarin) Date: Wed Mar 11 13:45:25 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <55004084.9030803@comcast.net> References: <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> <550037BB.3010207@comcast.net> <1426078494720-4811195.post@n4.nabble.com> <55004084.9030803@comcast.net> Message-ID: <1426080972889-4811210.post@n4.nabble.com> > What happens in VAST? I tried it in Workspace (but 10000! caused a stack overflow, so I used 1000!). The result follows: (0 0 1) 14:36:43.923 (0 0 2) 14:36:43.932 (0 0 3) 14:36:43.940 (0 0 4) 14:36:43.947 (0 0 5) 14:36:43.952 (0 0 6) 14:36:43.957 (0 0 7) 14:36:43.962 (0 0 8) 14:36:43.967 (0 0 9) 14:36:43.972 (0 0 10) 14:36:43.976 (0 1 10) 14:36:43.980 (0 2 10) 14:36:43.985 (0 3 10) 14:36:43.989 (0 4 10) 14:36:43.993 (0 5 10) 14:36:43.997 (0 6 10) 14:36:44.1 (0 7 10) 14:36:44.4 (0 8 10) 14:36:44.8 (0 9 10) 14:36:44.12 (0 10 10) 14:36:44.16 (1 10 10) 14:36:44.20 (2 10 10) 14:36:44.23 (3 10 10) 14:36:44.27 (4 10 10) 14:36:44.31 (5 10 10) 14:36:44.35 (6 10 10) 14:36:44.39 (7 10 10) 14:36:44.42 (8 10 10) 14:36:44.46 (9 10 10) 14:36:44.50 (10 10 10) 14:36:44.54 -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811210.html Sent from the Seaside General mailing list archive at Nabble.com. From arning315 at comcast.net Wed Mar 11 14:04:11 2015 From: arning315 at comcast.net (Bob Arning) Date: Wed Mar 11 14:04:15 2015 Subject: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <1426080972889-4811210.post@n4.nabble.com> References: <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> <550037BB.3010207@comcast.net> <1426078494720-4811195.post@n4.nabble.com> <55004084.9030803@comcast.net> <1426080972889-4811210.post@n4.nabble.com> Message-ID: <55004B5B.7020607@comcast.net> Just to be sure that we are wasting enough time, you might want to make that 100 timesRepeat: [1000!] But assuming that makes no difference: So that's the issue. Squeak and Pharo rotate the order of processes at a given priority whenever one is interrupted by a higher priority process. VAST appears not to do that (or there are no higher priority process running...). IOW, Squeak and Pharo offer a Poor Man's Time Slicing, although with no guarantee that the slices are equal in width. VAST offers what seems to ensure a process will not be pre-empted by another process at the same priority (which has a certain logical appeal ;-) ). Not having access to VAST, I can't tell you if this difference is accidental or intentional. Perhaps someone know a bit more... On 3/11/15 9:36 AM, wilwarin wrote: >> What happens in VAST? > I tried it in Workspace (but 10000! caused a stack overflow, so I used > 1000!). The result follows: > > (0 0 1) 14:36:43.923 > (0 0 2) 14:36:43.932 > (0 0 3) 14:36:43.940 > (0 0 4) 14:36:43.947 > (0 0 5) 14:36:43.952 > (0 0 6) 14:36:43.957 > (0 0 7) 14:36:43.962 > (0 0 8) 14:36:43.967 > (0 0 9) 14:36:43.972 > (0 0 10) 14:36:43.976 > (0 1 10) 14:36:43.980 > (0 2 10) 14:36:43.985 > (0 3 10) 14:36:43.989 > (0 4 10) 14:36:43.993 > (0 5 10) 14:36:43.997 > (0 6 10) 14:36:44.1 > (0 7 10) 14:36:44.4 > (0 8 10) 14:36:44.8 > (0 9 10) 14:36:44.12 > (0 10 10) 14:36:44.16 > (1 10 10) 14:36:44.20 > (2 10 10) 14:36:44.23 > (3 10 10) 14:36:44.27 > (4 10 10) 14:36:44.31 > (5 10 10) 14:36:44.35 > (6 10 10) 14:36:44.39 > (7 10 10) 14:36:44.42 > (8 10 10) 14:36:44.46 > (9 10 10) 14:36:44.50 > (10 10 10) 14:36:44.54 > > > > > -- > View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811210.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150311/93424334/attachment.htm From HNowak at cincom.com Wed Mar 11 14:15:39 2015 From: HNowak at cincom.com (Nowak, Helge) Date: Wed Mar 11 14:17:07 2015 Subject: AW: [Seaside] Re: Concurrent requests from multiple sessions In-Reply-To: <55004B5B.7020607@comcast.net> References: <1425982512096-4810877.post@n4.nabble.com> <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> <550037BB.3010207@comcast.net> <1426078494720-4811195.post@n4.nabble.com> <55004084.9030803@comcast.net> <1426080972889-4811210.post@n4.nabble.com> <55004B5B.7020607@comcast.net> Message-ID: <1ADAF00B5AB491448BCD6CE546DFFC261D4D82B3@IM08.cincomsys.local> I don't know VAST, yet in VisualWorks you can call "Processor yield" in your process which will give way to other processes. By that you'll get a simple "parallel" execution of your processes. HTH Helge Von: seaside-bounces@lists.squeakfoundation.org [mailto:seaside-bounces@lists.squeakfoundation.org] Im Auftrag von Bob Arning Gesendet: Mittwoch, 11. M?rz 2015 15:04 An: seaside@lists.squeakfoundation.org Betreff: Re: [Seaside] Re: Concurrent requests from multiple sessions Just to be sure that we are wasting enough time, you might want to make that 100 timesRepeat: [1000!] But assuming that makes no difference: So that's the issue. Squeak and Pharo rotate the order of processes at a given priority whenever one is interrupted by a higher priority process. VAST appears not to do that (or there are no higher priority process running...). IOW, Squeak and Pharo offer a Poor Man's Time Slicing, although with no guarantee that the slices are equal in width. VAST offers what seems to ensure a process will not be pre-empted by another process at the same priority (which has a certain logical appeal ;-) ). Not having access to VAST, I can't tell you if this difference is accidental or intentional. Perhaps someone know a bit more... On 3/11/15 9:36 AM, wilwarin wrote: What happens in VAST? I tried it in Workspace (but 10000! caused a stack overflow, so I used 1000!). The result follows: (0 0 1) 14:36:43.923 (0 0 2) 14:36:43.932 (0 0 3) 14:36:43.940 (0 0 4) 14:36:43.947 (0 0 5) 14:36:43.952 (0 0 6) 14:36:43.957 (0 0 7) 14:36:43.962 (0 0 8) 14:36:43.967 (0 0 9) 14:36:43.972 (0 0 10) 14:36:43.976 (0 1 10) 14:36:43.980 (0 2 10) 14:36:43.985 (0 3 10) 14:36:43.989 (0 4 10) 14:36:43.993 (0 5 10) 14:36:43.997 (0 6 10) 14:36:44.1 (0 7 10) 14:36:44.4 (0 8 10) 14:36:44.8 (0 9 10) 14:36:44.12 (0 10 10) 14:36:44.16 (1 10 10) 14:36:44.20 (2 10 10) 14:36:44.23 (3 10 10) 14:36:44.27 (4 10 10) 14:36:44.31 (5 10 10) 14:36:44.35 (6 10 10) 14:36:44.39 (7 10 10) 14:36:44.42 (8 10 10) 14:36:44.46 (9 10 10) 14:36:44.50 (10 10 10) 14:36:44.54 -- View this message in context: http://forum.world.st/Concurrent-requests-from-multiple-sessions-tp4809929p4811210.html Sent from the Seaside General mailing list archive at Nabble.com. _______________________________________________ seaside mailing list seaside@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150311/52c62a72/attachment-0001.htm From Lou at Keystone-Software.com Wed Mar 11 16:02:49 2015 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Wed Mar 11 16:03:01 2015 Subject: [Seaside] Concurrent requests from multiple sessions References: <1ADAF00B5AB491448BCD6CE546DFFC261D4CB428@IM08.cincomsys.local> <1425993938100-4810964.post@n4.nabble.com> <54FF0DB1.6010304@comcast.net> <1426055763450-4811143.post@n4.nabble.com> <550037BB.3010207@comcast.net> <1426078494720-4811195.post@n4.nabble.com> <55004084.9030803@comcast.net> <1426080972889-4811210.post@n4.nabble.com> <55004B5B.7020607@comcast.net> <1ADAF00B5AB491448BCD6CE546DFFC261D4D82B3@IM08.cincomsys.local> Message-ID: Hi Guys, I know VAST pretty well but this is an area few people delve into and I haven't looked at it for a while. That said, I think VAST ask the OS for an interrupt every 100 milliseconds. At which time it readies any processes that are no longer delayed and dispatches the highest priority process. As far as I can tell it does this without reordering processes of the same priority. So the interrupted process will resume if it is still the highest priority process. This is why I suggested earlier to either drop the priority of a process when it is engaged in heavy CPU usage and/or call "Processor yield" to let the next guy run for a while. Priorities range from 1 to 7. I think you will normally be at userSchedulingPriority - 3 and can drop to userBackgroundPriority - 2 with: self activeProcess priority: Processor userBackgroundPriority. and back with: self activeProcess priority: Processor userSchedulingPriority. The change in priority will take effect at the next interrupt. I think you can just put the above calls at the beginning and end of any heavy CPU work. The key word being "heavy", you don't want to wrap everything or your just running it all at a lower priority. If you can do this right you will have a high priority for short running things and a low priority for long running things. You should double check what priority Seaside is running sessions at. If you can find a convenient spot or spots that will break up the heavy processing in the middle (one or more middles) then calling Processor yield will give you a round robin effect. Good luck and feel free to ask more questions. You might also post this question at: https://groups.google.com/forum/#!forum/va-smalltalk. Lou On Wed, 11 Mar 2015 14:15:39 +0000, "Nowak, Helge" wrote: >I don't know VAST, yet in VisualWorks you can call "Processor yield" in your process which will give way to other processes. By that you'll get a simple "parallel" execution of your processes. > >HTH >Helge > >Von: seaside-bounces@lists.squeakfoundation.org [mailto:seaside-bounces@lists.squeakfoundation.org] Im Auftrag von Bob Arning >Gesendet: Mittwoch, 11. M?rz 2015 15:04 >An: seaside@lists.squeakfoundation.org >Betreff: Re: [Seaside] Re: Concurrent requests from multiple sessions > >Just to be sure that we are wasting enough time, you might want to make that > > 100 timesRepeat: [1000!] > >But assuming that makes no difference: > >So that's the issue. Squeak and Pharo rotate the order of processes at a given priority whenever one is interrupted by a higher priority process. VAST appears not to do that (or there are no higher priority process running...). IOW, > >Squeak and Pharo offer a Poor Man's Time Slicing, although with no guarantee that the slices are equal in width. >VAST offers what seems to ensure a process will not be pre-empted by another process at the same priority (which has a certain logical appeal ;-) ). > >Not having access to VAST, I can't tell you if this difference is accidental or intentional. Perhaps someone know a bit more... >On 3/11/15 9:36 AM, wilwarin wrote: > >What happens in VAST? > > > >I tried it in Workspace (but 10000! caused a stack overflow, so I used > >1000!). The result follows: > > > >(0 0 1) 14:36:43.923 > >(0 0 2) 14:36:43.932 > >(0 0 3) 14:36:43.940 > >(0 0 4) 14:36:43.947 > >(0 0 5) 14:36:43.952 > >(0 0 6) 14:36:43.957 > >(0 0 7) 14:36:43.962 > >(0 0 8) 14:36:43.967 > >(0 0 9) 14:36:43.972 > >(0 0 10) 14:36:43.976 > >(0 1 10) 14:36:43.980 > >(0 2 10) 14:36:43.985 > >(0 3 10) 14:36:43.989 > >(0 4 10) 14:36:43.993 > >(0 5 10) 14:36:43.997 > >(0 6 10) 14:36:44.1 > >(0 7 10) 14:36:44.4 > >(0 8 10) 14:36:44.8 > >(0 9 10) 14:36:44.12 > >(0 10 10) 14:36:44.16 > >(1 10 10) 14:36:44.20 > >(2 10 10) 14:36:44.23 > >(3 10 10) 14:36:44.27 > >(4 10 10) 14:36:44.31 > >(5 10 10) 14:36:44.35 > >(6 10 10) 14:36:44.39 > >(7 10 10) 14:36:44.42 > >(8 10 10) 14:36:44.46 > >(9 10 10) 14:36:44.50 > >(10 10 10) 14:36:44.54 ----------------------------------------------------------- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com From astares at gmx.de Thu Mar 12 10:22:55 2015 From: astares at gmx.de (Torsten Bergmann) Date: Thu Mar 12 10:22:57 2015 Subject: [Seaside] Modal dialogs and Updating/closing Message-ID: I have a modal dialog in Seaside like the Bootstrap one demonstrated here: http://pharo.pharocloud.com/bootstrap/browser/Modal%20example When I click on "Save Changes" I would like the server to verify data (for instance check credentials for a login) and possibly display a message in the dialog when the input was wrong. In such a case I only want to refresh the contents of the dialog and not a full page refresh, because with a full page refresh the dialog would not be open again but also I want the updated info to look smooth without flickering of a full page reload. Also when the data is fine after checking on the server the dialog should close. What options do I have/whats the best way to implement this? Any best practices or simple examples ideally with Bootstrap? Thx T. From gaston.dalloglio at gmail.com Thu Mar 12 13:24:59 2015 From: gaston.dalloglio at gmail.com (=?UTF-8?Q?Gast=C3=B3n_Dall=27_Oglio?=) Date: Thu Mar 12 13:25:21 2015 Subject: [Seaside] Modal dialogs and Updating/closing In-Reply-To: References: Message-ID: Hi Torsten. I do guess that it isn't a good practice, but see here for an simple example [1]. Here I have an abstract class where I render the page with a hidden dialog (PIComponent>>renderModalOn:) containing ids to show messages and errors. Later when I want to show an error I use PIComponent>>showError:on: You can see this in the concrete class PIExploreComponent. I can share the image within that I use those classes if you want. This was an experiment for a project that right now is dead. Best. [1] http://forum.world.st/Bootstrap-s-Modal-question-td4713488.html 2015-03-12 7:22 GMT-03:00 Torsten Bergmann : > I have a modal dialog in Seaside like the Bootstrap one demonstrated > here: > > http://pharo.pharocloud.com/bootstrap/browser/Modal%20example > > When I click on "Save Changes" I would like the server to verify > data (for instance check credentials for a login) and possibly > display a message in the dialog when the input was wrong. > > In such a case I only want to refresh the contents of the dialog > and not a full page refresh, because with a full page refresh the > dialog would not be open again but also I want the updated info > to look smooth without flickering of a full page reload. > > Also when the data is fine after checking on the server the > dialog should close. > > What options do I have/whats the best way to implement this? > Any best practices or simple examples ideally with Bootstrap? > > Thx > T. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150312/f2da3463/attachment.htm From sebastien.audier at gmail.com Fri Mar 13 01:21:37 2015 From: sebastien.audier at gmail.com (Sebastien Audier) Date: Fri Mar 13 01:21:38 2015 Subject: [Seaside] Fwd: Rest - Ajax request - build file In-Reply-To: References: Message-ID: Hi all, I work on pharo 2.0 and seaside-REST with ZincServer. I need to rebuild a file which is uploaded by POST requests through Seaside-REST but I don't really use WASession. On javascript layer, I cut the file with this function: document.querySelector('input[type="file"]').addEventListener('change', function(e) { var name = this.files.name; var blob = this.files[0]; const BYTES_PER_CHUNK = 1024 * 1024; // 1MB chunk sizes. const SIZE = blob.size; var start = 0; var end = BYTES_PER_CHUNK; while(start < SIZE) { upload(name, blob.slice(start, end)); start = end; end = start + BYTES_PER_CHUNK; }}, false); And I send datas with this function: function upload(aFileName, files) { var formData = new *FormData*(); for (var i = 0, file; file = files[i]; ++i) { *formData.append(aFileName, file);* } var xhr = new XMLHttpRequest(); xhr.open('POST', '/myPath', true); xhr.onload = function(e) { ... }; xhr.send(*formData*); // multipart/form-data} I have a POST method on my handler, but I receive multiple requests. On this way, I don't have access to the requestContext in order to get the WAFile in request. If I don't cut the file, it works and I can store on disk. But not in the other case. Of course, my goal is to store the file on disk correctly. So, How to get file content of each request ? How to rebuild and store the file correctly if the requests aren't ordored ? Any help ? Thank's a lot. -- S?bastien AUDIER -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150312/042ca7d3/attachment.htm From maarten.mostert at wanadoo.fr Fri Mar 13 23:57:06 2015 From: maarten.mostert at wanadoo.fr (Maarten Mostert) Date: Fri Mar 13 23:57:12 2015 Subject: [Seaside] Appex: Bootstrap Buttons Message-ID: Hi, I am bit puzzled with the interactions here: I use Bootstrap to build a website, and I implement the following theme: http://wrapbootstrap.com/preview/WB0DN19X0 On one of my pages I like to enter an input field with a submit button. I started with the event-source example that comes with Appex to copy the behavior, but I am getting stuck. My page looks like this. https://www.dropbox.com/s/eu7fdwxqoxu09ei/2015-03-13_19-34-30.png?dl=0 The red submit button is the one I try to get to work, the buttons below are the ones copied from the example that work just fine. I make the button with following code: var aButtonGroup = this.elementNameClass("div", "form-group"); var aButtonColum = this.elementNameClass("label", "col-sm-offset-3 col-sm-8"); var aButton =this.elementNameClass("button", "btn btn-default"); aButton.setAttribute("type", "submit"); aButton.appendChild(document.createTextNode("Submit")); aButton.setAttribute(? id", "theButton"); // next does not work aButton.setAttribute("onclick", "this.runWorkflow()"); //aButton.setAttribute("data-target", "#demo"); /* this does not work either $('#theButton').on('click', function (e) { alert("ok"); }); */ // neither does this button.click(function () { self.syncMessageToServer(? sent-message ?, "hi"); }); I tried all possible ways to get to action the button but each time a question mark is added to the url and $t gets undefined https://www.dropbox.com/s/v27vwaagz0puwuv/2015-03-13_19-50-05.png?dl=0 Any hints are welcome. Regards, @+Maarten, . -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150314/d7c4d2f4/attachment-0001.htm From julien.leclercq at gmx.fr Mon Mar 16 14:31:21 2015 From: julien.leclercq at gmx.fr (julien leclercq) Date: Mon Mar 16 14:31:24 2015 Subject: [Seaside] A submit button with bootstrap Message-ID: An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150316/27a9d016/attachment.htm From sven at stfx.eu Mon Mar 16 14:33:25 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Mon Mar 16 14:33:30 2015 Subject: [Seaside] A submit button with bootstrap In-Reply-To: References: Message-ID: <2ABC5AE1-0D8F-4806-9750-F2A267368519@stfx.eu> One way is like this: renderButtonsOn: html ^ html tbsButtonGroup: [ html submitButton class: 'btn btn-primary'; on: #login of: self ] > On 16 Mar 2015, at 15:31, julien leclercq wrote: > > Hi, > I need to implements a form with the bootstrap library for seaside but i can't reach to find how to place a bootstrap look alike submit button > thank you for reading this > Julien Leclercq > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From marianopeck at gmail.com Mon Mar 16 14:48:26 2015 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Mon Mar 16 14:48:30 2015 Subject: [Seaside] A submit button with bootstrap In-Reply-To: <2ABC5AE1-0D8F-4806-9750-F2A267368519@stfx.eu> References: <2ABC5AE1-0D8F-4806-9750-F2A267368519@stfx.eu> Message-ID: This will also help you: http://pharo.pharocloud.com/bootstrap/ On Mon, Mar 16, 2015 at 11:33 AM, Sven Van Caekenberghe wrote: > One way is like this: > > renderButtonsOn: html > ^ html > tbsButtonGroup: [ > html submitButton > class: 'btn btn-primary'; > on: #login of: self ] > > > On 16 Mar 2015, at 15:31, julien leclercq > wrote: > > > > Hi, > > I need to implements a form with the bootstrap library for seaside but i > can't reach to find how to place a bootstrap look alike submit button > > thank you for reading this > > Julien Leclercq > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150316/6345d7f9/attachment.htm From astares at gmx.de Thu Mar 19 11:01:33 2015 From: astares at gmx.de (Torsten Bergmann) Date: Thu Mar 19 11:01:35 2015 Subject: [Seaside] [OT] Bootstrap resources Message-ID: For those of you using Bootstrap to style Seaside apps this might be interesting or an inspiring source for own components: http://bootsnipp.com/ http://bootstraphero.com/the-big-badass-list-of-twitter-bootstrap-resources http://ashobiz.asia/boot-extended/demo From sm at planage.com Thu Mar 19 13:31:20 2015 From: sm at planage.com (Sanjay Minni) Date: Thu Mar 19 13:41:31 2015 Subject: [Seaside] Google AdSense Message-ID: <1426771880851-4813186.post@n4.nabble.com> Hi how do I place google adsense in my Pharo+Seaside website or what is the usual practice typically the code will be like ... ... regards Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Google-AdSense-tp4813186.html Sent from the Seaside General mailing list archive at Nabble.com. From philippe.marschall at gmail.com Thu Mar 19 19:47:04 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Thu Mar 19 19:47:06 2015 Subject: [Seaside] Google AdSense In-Reply-To: <1426771880851-4813186.post@n4.nabble.com> References: <1426771880851-4813186.post@n4.nabble.com> Message-ID: On Thu, Mar 19, 2015 at 2:31 PM, Sanjay Minni wrote: > Hi > > how do I place google adsense in my Pharo+Seaside website or what is the > usual practice Something like html script: 'the script content' should do the trick. You'll likely want to write a dedicated component for this that you can place at the bottom of you page. Cheers Philippe From sebastien.audier at gmail.com Fri Mar 20 00:42:59 2015 From: sebastien.audier at gmail.com (Sebastien Audier) Date: Fri Mar 20 00:43:01 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: References: Message-ID: Okay, I dropped the idea of cut the file. One solution (not tested yet): ZnConstants maximumEntitySize: 104857600 (100 * 1024 * 1024) in order to increase the size of incoming entities to 100 M for example. But, if we find one solution for the other case, we could upload file faster. Happy smalltalk ;) 2015-03-12 15:21 GMT-10:00 Sebastien Audier : > > Hi all, > > I work on pharo 2.0 and seaside-REST with ZincServer. > > I need to rebuild a file which is uploaded by POST requests through > Seaside-REST but I don't really use WASession. > > On javascript layer, I cut the file with this function: > > document.querySelector('input[type="file"]').addEventListener('change', function(e) { var name = this.files.name; > var blob = this.files[0]; > > const BYTES_PER_CHUNK = 1024 * 1024; // 1MB chunk sizes. > const SIZE = blob.size; > > var start = 0; > var end = BYTES_PER_CHUNK; > > while(start < SIZE) { > upload(name, blob.slice(start, end)); > > start = end; > end = start + BYTES_PER_CHUNK; > }}, false); > > And I send datas with this function: > > function upload(aFileName, files) { > var formData = new *FormData*(); > > for (var i = 0, file; file = files[i]; ++i) { > *formData.append(aFileName, file);* > } > > var xhr = new XMLHttpRequest(); > xhr.open('POST', '/myPath', true); > xhr.onload = function(e) { ... }; > > xhr.send(*formData*); // multipart/form-data} > > > I have a POST method on my handler, but I receive multiple requests. > On this way, I don't have access to the requestContext in order to get the > WAFile in request. > If I don't cut the file, it works and I can store on disk. But not in the > other case. > > Of course, my goal is to store the file on disk correctly. > > So, > How to get file content of each request ? > How to rebuild and store the file correctly if the requests aren't > ordored ? > > Any help ? > > Thank's a lot. > > > -- > S?bastien AUDIER > > > > -- S?bastien AUDIER -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150319/7c697faf/attachment-0001.htm From arning315 at comcast.net Fri Mar 20 01:02:00 2015 From: arning315 at comcast.net (Bob Arning) Date: Fri Mar 20 01:02:03 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: References: Message-ID: <550B7188.5030705@comcast.net> Not really sure I understand the question, but it sounds like you would need to include some sort of position information in each POST. That way the receiving end knows where in the file to put the data. On 3/19/15 8:42 PM, Sebastien Audier wrote: > Okay, I dropped the idea of cut the file. > > One solution (not tested yet): ZnConstants maximumEntitySize: > 104857600 (100 * 1024 * 1024) in order to increase the size of > incoming entities to 100 M for example. > > But, if we find one solution for the other case, we could upload file > faster. > > Happy smalltalk ;) > > 2015-03-12 15:21 GMT-10:00 Sebastien Audier > >: > > > Hi all, > > I work on pharo 2.0 and seaside-REST with ZincServer. > > I need to rebuild a file which is uploaded by POST requests > through Seaside-REST but I don't really use WASession. > > On javascript layer, I cut the file with this function: > > document.querySelector('input[type="file"]').addEventListener('change', function(e) { > var name =this.files.name ; > var blob= this.files[0]; > > const BYTES_PER_CHUNK= 1024 * 1024; // 1MB chunk sizes. > const SIZE= blob.size; > > var start= 0; > var end = BYTES_PER_CHUNK; > > while(start< SIZE) { > upload(name,blob.slice(start, end)); > > start= end; > end = start+ BYTES_PER_CHUNK; > } > }, false); > > And I send datas with this function: > > function upload(aFileName, files) { > var formData= new *FormData*(); > > for (var i= 0, file; file= files[i]; ++i) { > *formData.append(aFileName, file);* > } > > var xhr= new XMLHttpRequest(); > xhr.open('POST', '/myPath', true); > xhr.onload= function(e) { ... }; > > xhr.send(*formData*); // multipart/form-data > } > > > I have a POST method on my handler, but I receive multiple requests. > On this way, I don't have access to the requestContext in order to > get the WAFile in request. > If I don't cut the file, it works and I can store on disk. But not > in the other case. > > Of course, my goal is to store the file on disk correctly. > > So, > How to get file content of each request ? > How to rebuild and store the file correctly if the requests > aren't ordored ? > > Any help ? > > Thank's a lot. > > > -- > S?bastien AUDIER > > > > > > > > -- > S?bastien AUDIER > > > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150319/240e854d/attachment.htm From sebastien.audier at gmail.com Fri Mar 20 01:31:27 2015 From: sebastien.audier at gmail.com (Sebastien Audier) Date: Fri Mar 20 01:31:29 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: <550B7188.5030705@comcast.net> References: <550B7188.5030705@comcast.net> Message-ID: Hi Bob, Thanks for your answer. Right, but before this problem, I failed to recover the file content through the request. If I don't slice the file, I can recover a WAFile instance by: | file | file := self requestContext request postFields values first... And I stream on disk after that. If I slice the file on web client, I can't recover the WAFile, because: self requestContext -> return an error. What's wrong in my process ? Thanks again, 2015-03-19 15:02 GMT-10:00 Bob Arning : > Not really sure I understand the question, but it sounds like you would > need to include some sort of position information in each POST. That way > the receiving end knows where in the file to put the data. > > > On 3/19/15 8:42 PM, Sebastien Audier wrote: > > Okay, I dropped the idea of cut the file. > > One solution (not tested yet): ZnConstants maximumEntitySize: 104857600 > (100 * 1024 * 1024) in order to increase the size of incoming entities to > 100 M for example. > > But, if we find one solution for the other case, we could upload file > faster. > > Happy smalltalk ;) > > 2015-03-12 15:21 GMT-10:00 Sebastien Audier : > >> >> Hi all, >> >> I work on pharo 2.0 and seaside-REST with ZincServer. >> >> I need to rebuild a file which is uploaded by POST requests through >> Seaside-REST but I don't really use WASession. >> >> On javascript layer, I cut the file with this function: >> >> document.querySelector('input[type="file"]').addEventListener('change', function(e) { var name = this.files.name; >> var blob = this.files[0]; >> >> const BYTES_PER_CHUNK = 1024 * 1024; // 1MB chunk sizes. >> const SIZE = blob.size; >> >> var start = 0; >> var end = BYTES_PER_CHUNK; >> >> while(start < SIZE) { >> upload(name, blob.slice(start, end)); >> >> start = end; >> end = start + BYTES_PER_CHUNK; >> }}, false); >> >> And I send datas with this function: >> >> function upload(aFileName, files) { >> var formData = new *FormData*(); >> >> for (var i = 0, file; file = files[i]; ++i) { >> *formData.append(aFileName, file);* >> } >> >> var xhr = new XMLHttpRequest(); >> xhr.open('POST', '/myPath', true); >> xhr.onload = function(e) { ... }; >> >> xhr.send(*formData*); // multipart/form-data} >> >> >> I have a POST method on my handler, but I receive multiple requests. >> On this way, I don't have access to the requestContext in order to get >> the WAFile in request. >> If I don't cut the file, it works and I can store on disk. But not in the >> other case. >> >> Of course, my goal is to store the file on disk correctly. >> >> So, >> How to get file content of each request ? >> How to rebuild and store the file correctly if the requests aren't >> ordored ? >> >> Any help ? >> >> Thank's a lot. >> >> >> -- >> S?bastien AUDIER >> >> >> >> > > > > -- > S?bastien AUDIER > > > > > > _______________________________________________ > seaside mailing listseaside@lists.squeakfoundation.orghttp://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > -- S?bastien AUDIER -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150319/d8243c3c/attachment-0001.htm From arning315 at comcast.net Fri Mar 20 01:46:18 2015 From: arning315 at comcast.net (Bob Arning) Date: Fri Mar 20 01:46:21 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: References: <550B7188.5030705@comcast.net> Message-ID: <550B7BEA.4000306@comcast.net> sounds like the sliced and non-sliced versions are posting in somewhat different ways. does the sample code below work ok if the data is less than BYTES_PER_CHUNK? IOW, is the code ok for a single chunk POST, but failing for multiple chunks? What does the receiving code look like? Is it different for the sliced and non-sliced versions? Can you say more about what "return an error" is? Is there a debugger stack you could include? On 3/19/15 9:31 PM, Sebastien Audier wrote: > Hi Bob, Thanks for your answer. > > Right, but before this problem, I failed to recover the file content > through the request. > > If I don't slice the file, I can recover a WAFile instance by: > > | file | > file := self requestContext request postFields values first... > And I stream on disk after that. > > If I slice the file on web client, I can't recover the WAFile, because: > > self requestContext -> return an error. > > What's wrong in my process ? > > > Thanks again, > > 2015-03-19 15:02 GMT-10:00 Bob Arning >: > > Not really sure I understand the question, but it sounds like you > would need to include some sort of position information in each > POST. That way the receiving end knows where in the file to put > the data. > > > On 3/19/15 8:42 PM, Sebastien Audier wrote: >> Okay, I dropped the idea of cut the file. >> >> One solution (not tested yet): ZnConstants maximumEntitySize: >> 104857600 (100 * 1024 * 1024) in order to increase the size of >> incoming entities to 100 M for example. >> >> But, if we find one solution for the other case, we could upload >> file faster. >> >> Happy smalltalk ;) >> >> 2015-03-12 15:21 GMT-10:00 Sebastien Audier >> >: >> >> >> Hi all, >> >> I work on pharo 2.0 and seaside-REST with ZincServer. >> >> I need to rebuild a file which is uploaded by POST requests >> through Seaside-REST but I don't really use WASession. >> >> On javascript layer, I cut the file with this function: >> >> document.querySelector('input[type="file"]').addEventListener('change', function(e) { >> var name =this.files.name ; >> var blob= this.files[0]; >> >> const BYTES_PER_CHUNK= 1024 * 1024; // 1MB chunk sizes. >> const SIZE= blob.size; >> >> var start= 0; >> var end = BYTES_PER_CHUNK; >> >> while(start< SIZE) { >> upload(name,blob.slice(start, end)); >> >> start= end; >> end = start+ BYTES_PER_CHUNK; >> } >> }, false); >> >> And I send datas with this function: >> >> function upload(aFileName, files) { >> var formData= new *FormData*(); >> >> for (var i= 0, file; file= files[i]; ++i) { >> *formData.append(aFileName, file);* >> } >> >> var xhr= new XMLHttpRequest(); >> xhr.open('POST', '/myPath', true); >> xhr.onload= function(e) { ... }; >> >> xhr.send(*formData*); // multipart/form-data >> } >> >> >> I have a POST method on my handler, but I receive multiple >> requests. >> On this way, I don't have access to the requestContext in >> order to get the WAFile in request. >> If I don't cut the file, it works and I can store on disk. >> But not in the other case. >> >> Of course, my goal is to store the file on disk correctly. >> >> So, >> How to get file content of each request ? >> How to rebuild and store the file correctly if the requests >> aren't ordored ? >> >> Any help ? >> >> Thank's a lot. >> >> >> -- >> S?bastien AUDIER >> >> >> >> >> >> >> >> -- >> S?bastien AUDIER >> >> >> >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > -- > S?bastien AUDIER > > > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150319/da19b0e0/attachment.htm From sm at planage.com Fri Mar 20 04:34:49 2015 From: sm at planage.com (Sanjay Minni) Date: Fri Mar 20 04:45:04 2015 Subject: [Seaside] Re: Google AdSense In-Reply-To: References: <1426771880851-4813186.post@n4.nabble.com> Message-ID: <1426826089700-4813433.post@n4.nabble.com> Thanks ... but seems it does not work here is the code it generates (thru halos): lines 1, 2, 9, 10 are from seaside lines 3-8 are the adsense code this includes 4. adsense 5. adsense 8. adsense 9. seaside /*]]>*/ 10.seaside How to avoid the seaside part of code or replace with the adsense acript tags regards Sanjay Philippe Marschall wrote > On Thu, Mar 19, 2015 at 2:31 PM, Sanjay Minni < > sm@ > > wrote: >> Hi >> >> how do I place google adsense in my Pharo+Seaside website or what is the >> usual practice > > Something like > > html script: 'the script content' > > should do the trick. You'll likely want to write a dedicated component > for this that you can place at the bottom of you page. > > Cheers > Philippe > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Google-AdSense-tp4813186p4813433.html Sent from the Seaside General mailing list archive at Nabble.com. From sebastien.audier at gmail.com Fri Mar 20 04:48:30 2015 From: sebastien.audier at gmail.com (Sebastien Audier) Date: Fri Mar 20 04:48:33 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: <550B7BEA.4000306@comcast.net> References: <550B7188.5030705@comcast.net> <550B7BEA.4000306@comcast.net> Message-ID: 2015-03-19 15:46 GMT-10:00 Bob Arning : > sounds like the sliced and non-sliced versions are posting in somewhat > different ways. > Yes, sounds like the sliced version is posting in different format. And may be, Zinc doesn't handle correctly. > > does the sample code below work ok if the data is less than > BYTES_PER_CHUNK? IOW, is the code ok for a single chunk POST, but failing > for multiple chunks? > Not only multiple chunks. Even if the file is smaller than the BYTES_PER_CHUNK limit, it doesn't work. It doesn't work with just one request. > > What does the receiving code look like? Is it different for the sliced and > non-sliced versions? > > No it's the same method. > Can you say more about what "return an error" is? Is there a debugger > stack you could include? > > Okay, this is my post method on the handler. test | uploadedFile disk file | uploadedFile := self requestContext request postFields values first. "here, uploadedFile is a WAFile if we don't slice the file" [disk := (FileSystem disk workingDirectory / 'ressources' / 'upload'). disk ensureDirectory. file := ((disk / (uploadedFile fileName)) ensureFile). file writeStreamDo: [:str | str nextPutAll: (uploadedFile rawContents)]] fork. ^'' when I slice the file, the self requestContext return a signal does not undestood. Did you need more informations ? Thanks again, -- S?bastien AUDIER -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150319/fd26aa8f/attachment-0001.htm From sven at stfx.eu Fri Mar 20 06:37:55 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Fri Mar 20 06:38:00 2015 Subject: [Seaside] Re: Google AdSense In-Reply-To: <1426826089700-4813433.post@n4.nabble.com> References: <1426771880851-4813186.post@n4.nabble.com> <1426826089700-4813433.post@n4.nabble.com> Message-ID: <22D9F0FD-C8F1-40C2-B9BF-1AFE877CA77F@stfx.eu> Use html html: '..' > On 20 Mar 2015, at 05:34, Sanjay Minni wrote: > > Thanks ... but seems it does not work > > here is the code it generates (thru halos): > lines 1, 2, 9, 10 are from seaside > lines 3-8 are the adsense code this includes > 4. adsense > 5. adsense style="display:inline-block;width:728px;height:90px" > 6. adsense data-ad-client="..." > 7. adsense > data-ad-slot="..."> > 8. adsense > 9. seaside /*]]>*/ > 10.seaside > > How to avoid the seaside part of code or replace with the adsense acript > tags > > regards > Sanjay > > > > Philippe Marschall wrote >> On Thu, Mar 19, 2015 at 2:31 PM, Sanjay Minni < > >> sm@ > >> > wrote: >>> Hi >>> >>> how do I place google adsense in my Pharo+Seaside website or what is the >>> usual practice >> >> Something like >> >> html script: 'the script content' >> >> should do the trick. You'll likely want to write a dedicated component >> for this that you can place at the bottom of you page. >> >> Cheers >> Philippe >> _______________________________________________ >> seaside mailing list > >> seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > ----- > --- > Regards, Sanjay > -- > View this message in context: http://forum.world.st/Google-AdSense-tp4813186p4813433.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From sm at planage.com Fri Mar 20 06:51:46 2015 From: sm at planage.com (Sanjay Minni) Date: Fri Mar 20 07:02:01 2015 Subject: [Seaside] Re: Google AdSense In-Reply-To: <22D9F0FD-C8F1-40C2-B9BF-1AFE877CA77F@stfx.eu> References: <1426771880851-4813186.post@n4.nabble.com> <1426826089700-4813433.post@n4.nabble.com> <22D9F0FD-C8F1-40C2-B9BF-1AFE877CA77F@stfx.eu> Message-ID: <1426834306160-4813441.post@n4.nabble.com> Thanks It works (I've just used it on uxfin.com ... a playground site) Regards Sanjay Sven Van Caekenberghe-2 wrote > Use > > html html: ' > > .. > > ' > >> On 20 Mar 2015, at 05:34, Sanjay Minni < > sm@ > > wrote: >> >> Thanks ... but seems it does not work >> >> here is the code it generates (thru halos): >> lines 1, 2, 9, 10 are from seaside >> lines 3-8 are the adsense code this includes >> 4. adsense >> 5. adsense > > > style="display:inline-block;width:728px;height:90px" >> 6. adsense >> data-ad-client="..." >> 7. adsense >> data-ad-slot="..."> > > >> 8. adsense >> 9. seaside /*]]>*/ >> 10.seaside > >> >> How to avoid the seaside part of code or replace with the adsense acript >> tags >> >> regards >> Sanjay >> >> >> >> Philippe Marschall wrote >>> On Thu, Mar 19, 2015 at 2:31 PM, Sanjay Minni < >> >>> sm@ >> >>> > wrote: >>>> Hi >>>> >>>> how do I place google adsense in my Pharo+Seaside website or what is >>>> the >>>> usual practice >>> >>> Something like >>> >>> html script: 'the script content' >>> >>> should do the trick. You'll likely want to write a dedicated component >>> for this that you can place at the bottom of you page. >>> >>> Cheers >>> Philippe >>> _______________________________________________ >>> seaside mailing list >> >>> seaside@.squeakfoundation >> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> >> >> >> ----- >> --- >> Regards, Sanjay >> -- >> View this message in context: >> http://forum.world.st/Google-AdSense-tp4813186p4813433.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Google-AdSense-tp4813186p4813441.html Sent from the Seaside General mailing list archive at Nabble.com. From arning315 at comcast.net Fri Mar 20 11:47:53 2015 From: arning315 at comcast.net (Bob Arning) Date: Fri Mar 20 11:47:56 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: References: <550B7188.5030705@comcast.net> <550B7BEA.4000306@comcast.net> Message-ID: <550C08E9.4060507@comcast.net> On 3/20/15 12:48 AM, Sebastien Audier wrote: > > > > 2015-03-19 15:46 GMT-10:00 Bob Arning >: > > sounds like the sliced and non-sliced versions are posting in > somewhat different ways. > > > Yes, sounds like the sliced version is posting in different format. > And may be, Zinc doesn't handle correctly. So, how do you POST in the non-sliced version? > > > does the sample code below work ok if the data is less than > BYTES_PER_CHUNK? IOW, is the code ok for a single chunk POST, but > failing for multiple chunks? > > > > Not only multiple chunks. Even if the file is smaller than the > BYTES_PER_CHUNK limit, it doesn't work. It doesn't work with just one > request. > > > What does the receiving code look like? Is it different for the > sliced and non-sliced versions? > > > No it's the same method. > > Can you say more about what "return an error" is? Is there a > debugger stack you could include? > > > > Okay, this is my post method on the handler. > > test > > > | uploadedFile disk file | > > uploadedFile := self requestContext request postFields values first. > > "here, uploadedFile is a WAFile if we don't slice the file" > > [disk := (FileSystem disk workingDirectory / 'ressources' / 'upload'). > disk ensureDirectory. > file := ((disk / (uploadedFile fileName)) ensureFile). > file writeStreamDo: [:str | > str > nextPutAll: (uploadedFile rawContents)]] fork. > ^'' > > > > when I slice the file, the self requestContext return a signal does > not undestood. If there us a SqueakDebug.log (or similar), that would tell us exactly what was not understood and by whom. Which might help us in determining what's wrong with the POST. > > > Did you need more informations ? > > > Thanks again, > > -- > S?bastien AUDIER > > > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150320/5f9e41d4/attachment.htm From sm at planage.com Fri Mar 20 12:36:38 2015 From: sm at planage.com (Sanjay Minni) Date: Fri Mar 20 12:46:56 2015 Subject: [Seaside] Re: Google AdSense In-Reply-To: References: <1426771880851-4813186.post@n4.nabble.com> Message-ID: <1426854998066-4813585.post@n4.nabble.com> Hi Phillippe, (while html html: '...' works) I wanted to understand your suggestion on making a dedicated component. Typically I was putting it in a separate method within the class using code and then calling "self renderGoogleAd: html" at the required places. Is there a more appropriate way ? regards Sanjay Philippe Marschall wrote > On Thu, Mar 19, 2015 at 2:31 PM, Sanjay Minni < > sm@ > > wrote: >> Hi >> >> how do I place google adsense in my Pharo+Seaside website or what is the >> usual practice > > Something like > > html script: 'the script content' > > should do the trick. You'll likely want to write a dedicated component > for this that you can place at the bottom of you page. > > Cheers > Philippe > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Google-AdSense-tp4813186p4813585.html Sent from the Seaside General mailing list archive at Nabble.com. From philippe.marschall at gmail.com Fri Mar 20 16:44:32 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Fri Mar 20 16:44:34 2015 Subject: [Seaside] Re: Google AdSense In-Reply-To: <1426854998066-4813585.post@n4.nabble.com> References: <1426771880851-4813186.post@n4.nabble.com> <1426854998066-4813585.post@n4.nabble.com> Message-ID: On Fri, Mar 20, 2015 at 1:36 PM, Sanjay Minni wrote: > Hi Phillippe, > > (while html html: '...' works) I wanted to understand your suggestion on > making a dedicated component. > > Typically I was putting it in a separate method within the class using code > and then calling "self renderGoogleAd: html" at the required places. Is > there a more appropriate way ? Putting it inside a dedicated component makes it more easily reusable. There is no need to do this. There is no clear rule what should be a component and what not. You can always do this later. Cheers Philippe From pdebruic at gmail.com Fri Mar 20 18:04:47 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Fri Mar 20 18:15:06 2015 Subject: [Seaside] Re: Google AdSense In-Reply-To: <1426854998066-4813585.post@n4.nabble.com> References: <1426771880851-4813186.post@n4.nabble.com> <1426854998066-4813585.post@n4.nabble.com> Message-ID: <1426874687524-4813670.post@n4.nabble.com> Julian Fitzell wrote up a nice overview about when to use a component or not here: http://blog.fitzell.ca/2009/05/when-to-use-seaside-component.html Sanjay Minni wrote > Hi Phillippe, > > (while html html: '...' works) I wanted to understand your suggestion on > making a dedicated component. > > Typically I was putting it in a separate method within the class using > code and then calling "self renderGoogleAd: html" at the required places. > Is there a more appropriate way ? > > regards > Sanjay > > Philippe Marschall wrote >> On Thu, Mar 19, 2015 at 2:31 PM, Sanjay Minni < >> sm@ >> > wrote: >>> Hi >>> >>> how do I place google adsense in my Pharo+Seaside website or what is the >>> usual practice >> >> Something like >> >> html script: 'the script content' >> >> should do the trick. You'll likely want to write a dedicated component >> for this that you can place at the bottom of you page. >> >> Cheers >> Philippe >> _______________________________________________ >> seaside mailing list >> seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Google-AdSense-tp4813186p4813670.html Sent from the Seaside General mailing list archive at Nabble.com. From sebastien.audier at gmail.com Fri Mar 20 18:22:11 2015 From: sebastien.audier at gmail.com (Sebastien Audier) Date: Fri Mar 20 18:22:14 2015 Subject: [Seaside] Re: Rest - Ajax request - build file In-Reply-To: <550C08E9.4060507@comcast.net> References: <550B7188.5030705@comcast.net> <550B7BEA.4000306@comcast.net> <550C08E9.4060507@comcast.net> Message-ID: > > > So, how do you POST in the non-sliced version? > > > > Just like it: function upload(files) { var formData = new *FormData*(); for (var i = 0, file; file = files[i]; ++i) { *formData.append(files.name , file);* } var xhr = new XMLHttpRequest(); xhr.open('POST', '/myPath', true); xhr.onload = function(e) { }; xhr.send(*formData*); // multipart/form-data } > > when I slice the file, the self requestContext return a signal does not > undestood. > > If there us a SqueakDebug.log (or similar), that would tell us exactly > what was not understood and by whom. Which might help us in determining > what's wrong with the POST. > > Okay, I am at the office and I don't have access to my pharo, but when I could reproduce this log, I will send it to you. Thanks -- S?bastien AUDIER -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150320/bfb7d918/attachment.htm From sm at planage.com Thu Mar 26 10:23:24 2015 From: sm at planage.com (Sanjay Minni) Date: Thu Mar 26 10:34:23 2015 Subject: [Seaside] Creating a date component to avoid repeating code Message-ID: <1427365404089-4815256.post@n4.nabble.com> Hi, How can I create a date component when I can use at several places. Currently I end up repeating code below wherever I need to accept date (with the JQuery date picker). I would attempt something similar to accept currency (right justified, fixed decimal places and commas) === html textInput value: ( tr date printFormat: #(1 2 3 $/ 1 1 2) ); placeholder: 'dd/mm/yyyy'; callback: [ :value | : ( Date readFrom: value pattern: 'dd/mm/yyyy' ) ]; script: (html jQuery new datepicker autoSize: true; dateFormat: 'dd/mm/yy'; changeMonth: true; changeYear: true; onSelect: ( html jQuery ajax serializeThis ) ) === regards Sanjay ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Creating-a-date-component-to-avoid-repeating-code-tp4815256.html Sent from the Seaside General mailing list archive at Nabble.com. From jtuchel at objektfabrik.de Thu Mar 26 10:51:22 2015 From: jtuchel at objektfabrik.de (Joachim Tuchel) Date: Thu Mar 26 10:51:26 2015 Subject: [Seaside] Creating a date component to avoid repeating code Message-ID: Hi Sanjay, Subclass WAComponent, implement your render code in renderContentOn:, that's basically it. It is probably a good idea to add an instvar for the date instance to that new Component. Hth, Joachim Am 26.03.2015 11:23 schrieb Sanjay Minni : > > Hi, > > How can I create a date component when I can use at several places.? > Currently I end up repeating code below wherever I need to accept date (with > the JQuery date picker). > I would attempt something similar to accept currency (right justified, fixed > decimal places and commas) > === > ??? html textInput > value: ( tr date printFormat: #(1 2 3 $/ 1 1 2) ); > placeholder: 'dd/mm/yyyy'; > callback: [ :value |? : ( Date readFrom: value pattern: > 'dd/mm/yyyy' ) ]; > script: (html jQuery new datepicker > autoSize: true; > dateFormat: 'dd/mm/yy'; > changeMonth: true; > changeYear: true; > onSelect: ( html jQuery ajax serializeThis ) ) > === > > regards > Sanjay > > > > ----- > --- > Regards, Sanjay > -- > View this message in context: http://forum.world.st/Creating-a-date-component-to-avoid-repeating-code-tp4815256.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > From bsselfridge at gmail.com Thu Mar 26 16:42:18 2015 From: bsselfridge at gmail.com (bsselfridge@gmail.com) Date: Thu Mar 26 16:53:21 2015 Subject: [Seaside] Re: Modal dialogs and Updating/closing In-Reply-To: References: Message-ID: <1427388138171-4815349.post@n4.nabble.com> Gaston, I am trying to build an add/edit/view modal dialog and am having trouble wrapping my head around how to do this in the Seaside component model. You seem to have mastered this. Would you be willing to share some examples? (Both the dialog code, invoking the dialog with data, and returning the results from the dialog). Thank you in advance, Brad Selfridge ----- Brad Selfridge -- View this message in context: http://forum.world.st/Modal-dialogs-and-Updating-closing-tp4811411p4815349.html Sent from the Seaside General mailing list archive at Nabble.com. From sm at planage.com Thu Mar 26 17:45:18 2015 From: sm at planage.com (Sanjay Minni) Date: Thu Mar 26 17:56:17 2015 Subject: [Seaside] Re: Creating a date component to avoid repeating code In-Reply-To: References: <1427365404089-4815256.post@n4.nabble.com> Message-ID: <1427391918572-4815376.post@n4.nabble.com> Hi Joachim I got that and have a date component now, MyDateComponent with accessors myDate and myDate: but what is the usual approach to using the component ... will it be a child component (seaside book section 12.1) - so I need to - initialize - add it as a child in >>children - html render: dateComponent the issue will be that if the entry screen is like a table with n rows, each having a date component then while creating / deleting a row I will have to sync the entry in the >>children method. or am I totally offtrack here what is the usual approach to use this component Regards Sanjay jtuchel wrote > Hi Sanjay, > > Subclass WAComponent, implement your render code in renderContentOn:, > that's basically it. > It is probably a good idea to add an instvar for the date instance to that > new Component. > > Hth, > > Joachim > > Am 26.03.2015 11:23 schrieb Sanjay Minni < > sm@ > >: >> >> Hi, >> >> How can I create a date component when I can use at several places.? >> Currently I end up repeating code below wherever I need to accept date >> (with >> the JQuery date picker). >> I would attempt something similar to accept currency (right justified, >> fixed >> decimal places and commas) >> === >> ??? html textInput >> value: ( tr date printFormat: #(1 2 3 $/ 1 1 2) ); >> placeholder: 'dd/mm/yyyy'; >> callback: [ :value |? > > : ( Date readFrom: value pattern: >> 'dd/mm/yyyy' ) ]; >> script: (html jQuery new datepicker >> autoSize: true; >> dateFormat: 'dd/mm/yy'; >> changeMonth: true; >> changeYear: true; >> onSelect: ( html jQuery ajax serializeThis ) ) >> === >> >> regards >> Sanjay >> >> >> >> ----- >> --- >> Regards, Sanjay >> -- >> View this message in context: >> http://forum.world.st/Creating-a-date-component-to-avoid-repeating-code-tp4815256.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside ----- --- Regards, Sanjay -- View this message in context: http://forum.world.st/Creating-a-date-component-to-avoid-repeating-code-tp4815256p4815376.html Sent from the Seaside General mailing list archive at Nabble.com. From gaston.dalloglio at gmail.com Thu Mar 26 18:55:00 2015 From: gaston.dalloglio at gmail.com (=?UTF-8?Q?Gast=C3=B3n_Dall=27_Oglio?=) Date: Thu Mar 26 18:55:23 2015 Subject: [Seaside] Re: Modal dialogs and Updating/closing In-Reply-To: <1427388138171-4815349.post@n4.nabble.com> References: <1427388138171-4815349.post@n4.nabble.com> Message-ID: Hi Brad. Yes I can share it of course! Please give me some time to find the image (and probably polish a little to you can understand better the code), because I have it in some backup external disk (sadly I have been a very unorganized with the code's packaging). Best. 2015-03-26 13:42 GMT-03:00 bsselfridge@gmail.com : > Gaston, > > I am trying to build an add/edit/view modal dialog and am having trouble > wrapping my head around how to do this in the Seaside component model. You > seem to have mastered this. Would you be willing to share some examples? > (Both the dialog code, invoking the dialog with data, and returning the > results from the dialog). > > > Thank you in advance, > > Brad Selfridge > > > > ----- > Brad Selfridge > -- > View this message in context: > http://forum.world.st/Modal-dialogs-and-Updating-closing-tp4811411p4815349.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150326/bd9deb06/attachment.htm From self at je77.com Fri Mar 27 16:40:00 2015 From: self at je77.com (J.F. Rick) Date: Fri Mar 27 16:40:03 2015 Subject: [Seaside] Alternative to call: Message-ID: This is a silly novice question but I couldn't easily find the answer in the documentation. I'm trying to open up a completely different part of my application. When I do call:, it replaces the component with the new component. I want it to replace everything. What do I do? Cheers, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150327/88c282d2/attachment.htm From bsselfridge at gmail.com Fri Mar 27 17:20:36 2015 From: bsselfridge at gmail.com (Brad) Date: Fri Mar 27 17:20:40 2015 Subject: [Seaside] Alternative to call: In-Reply-To: References: Message-ID: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> Would a redirect work? Brad Selfridge 913-269-2385 > On Mar 27, 2015, at 11:40 AM, J.F. Rick wrote: > > This is a silly novice question but I couldn't easily find the answer in the documentation. I'm trying to open up a completely different part of my application. When I do call:, it replaces the component with the new component. I want it to replace everything. What do I do? > > Cheers, > > Jeff > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From self at je77.com Fri Mar 27 23:13:47 2015 From: self at je77.com (J.F. Rick) Date: Fri Mar 27 23:13:50 2015 Subject: [Seaside] Alternative to call: In-Reply-To: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> References: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> Message-ID: Maybe? :) What's a redirect? I can't really find that either. The main thing I found is this: http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component Cheers, Jeff On Fri, Mar 27, 2015 at 1:20 PM Brad wrote: > Would a redirect work? > > Brad Selfridge > 913-269-2385 > > > On Mar 27, 2015, at 11:40 AM, J.F. Rick wrote: > > > > This is a silly novice question but I couldn't easily find the answer in > the documentation. I'm trying to open up a completely different part of my > application. When I do call:, it replaces the component with the new > component. I want it to replace everything. What do I do? > > > > Cheers, > > > > Jeff > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150327/6c7cdbcd/attachment.htm From self at je77.com Fri Mar 27 23:28:01 2015 From: self at je77.com (J.F. Rick) Date: Fri Mar 27 23:28:04 2015 Subject: [Seaside] Alternative to call: In-Reply-To: References: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> Message-ID: Perhaps I figured it out. I just replaced self call: something with self session presenter call: something It works, but it may not be the right way to do this. Cheers, Jeff On Fri, Mar 27, 2015 at 7:13 PM J.F. Rick wrote: > Maybe? :) What's a redirect? I can't really find that either. The main > thing I found is this: > > http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component > > Cheers, > > Jeff > > > On Fri, Mar 27, 2015 at 1:20 PM Brad wrote: > >> Would a redirect work? >> >> Brad Selfridge >> 913-269-2385 >> >> > On Mar 27, 2015, at 11:40 AM, J.F. Rick wrote: >> > >> > This is a silly novice question but I couldn't easily find the answer >> in the documentation. I'm trying to open up a completely different part of >> my application. When I do call:, it replaces the component with the new >> component. I want it to replace everything. What do I do? >> > >> > Cheers, >> > >> > Jeff >> > _______________________________________________ >> > seaside mailing list >> > seaside@lists.squeakfoundation.org >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150327/4ee7ba95/attachment.htm From sven at stfx.eu Fri Mar 27 23:31:35 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Fri Mar 27 23:31:40 2015 Subject: [Seaside] Alternative to call: In-Reply-To: References: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> Message-ID: <9F5E6BC8-549A-454B-93ED-8B66A8EF9B7C@stfx.eu> WARequestContext>>#redirectTo: As in self requestContext redirectTo: '/browse' > On 28 Mar 2015, at 00:13, J.F. Rick wrote: > > Maybe? :) What's a redirect? I can't really find that either. The main thing I found is this: > http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component > > Cheers, > > Jeff > > > On Fri, Mar 27, 2015 at 1:20 PM Brad wrote: > Would a redirect work? > > Brad Selfridge > 913-269-2385 > > > On Mar 27, 2015, at 11:40 AM, J.F. Rick wrote: > > > > This is a silly novice question but I couldn't easily find the answer in the documentation. I'm trying to open up a completely different part of my application. When I do call:, it replaces the component with the new component. I want it to replace everything. What do I do? > > > > Cheers, > > > > Jeff > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From self at je77.com Fri Mar 27 23:42:26 2015 From: self at je77.com (J.F. Rick) Date: Fri Mar 27 23:42:30 2015 Subject: [Seaside] Alternative to call: In-Reply-To: <9F5E6BC8-549A-454B-93ED-8B66A8EF9B7C@stfx.eu> References: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> <9F5E6BC8-549A-454B-93ED-8B66A8EF9B7C@stfx.eu> Message-ID: Right, but, if I were to do a static url, it would be much easier just to use html anchor url: '/browse' instead of html anchor callback: [ self requestContext redirectTo: '/browse' ] I just want my top component replaced by the call rather than the component that issues the callback. Cheers, Jeff On Fri, Mar 27, 2015 at 7:31 PM Sven Van Caekenberghe wrote: > WARequestContext>>#redirectTo: > > As in > > self requestContext redirectTo: '/browse' > > > On 28 Mar 2015, at 00:13, J.F. Rick wrote: > > > > Maybe? :) What's a redirect? I can't really find that either. The main > thing I found is this: > > http://stackoverflow.com/questions/7977179/how-do-i- > simply-redirect-to-another-toplevel-seaside-component > > > > Cheers, > > > > Jeff > > > > > > On Fri, Mar 27, 2015 at 1:20 PM Brad wrote: > > Would a redirect work? > > > > Brad Selfridge > > 913-269-2385 > > > > > On Mar 27, 2015, at 11:40 AM, J.F. Rick wrote: > > > > > > This is a silly novice question but I couldn't easily find the answer > in the documentation. I'm trying to open up a completely different part of > my application. When I do call:, it replaces the component with the new > component. I want it to replace everything. What do I do? > > > > > > Cheers, > > > > > > Jeff > > > _______________________________________________ > > > seaside mailing list > > > seaside@lists.squeakfoundation.org > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150327/e102cef9/attachment.htm From sven at stfx.eu Sat Mar 28 09:05:02 2015 From: sven at stfx.eu (Sven Van Caekenberghe) Date: Sat Mar 28 09:05:08 2015 Subject: [Seaside] Alternative to call: In-Reply-To: References: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> <9F5E6BC8-549A-454B-93ED-8B66A8EF9B7C@stfx.eu> Message-ID: > On 28 Mar 2015, at 00:42, J.F. Rick wrote: > > Right, but, if I were to do a static url, it would be much easier just to use > html anchor url: '/browse' > instead of > html anchor callback: [ self requestContext redirectTo: '/browse' ] > I just want my top component replaced by the call rather than the component that issues the callback. With the redirect you will also loose your session I guess, probably not what you want. For what you want, you need to structure your app differently, but that is up to you, there is not one solution. Eg. a shell app with one main subcomponent, and some mechanism to communicate, like announcements. Using a top level task can also solve many problems. > Cheers, > > Jeff > > > On Fri, Mar 27, 2015 at 7:31 PM Sven Van Caekenberghe wrote: > WARequestContext>>#redirectTo: > > As in > > self requestContext redirectTo: '/browse' > > > On 28 Mar 2015, at 00:13, J.F. Rick wrote: > > > > Maybe? :) What's a redirect? I can't really find that either. The main thing I found is this: > > http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component > > > > Cheers, > > > > Jeff > > > > > > On Fri, Mar 27, 2015 at 1:20 PM Brad wrote: > > Would a redirect work? > > > > Brad Selfridge > > 913-269-2385 > > > > > On Mar 27, 2015, at 11:40 AM, J.F. Rick wrote: > > > > > > This is a silly novice question but I couldn't easily find the answer in the documentation. I'm trying to open up a completely different part of my application. When I do call:, it replaces the component with the new component. I want it to replace everything. What do I do? > > > > > > Cheers, > > > > > > Jeff > > > _______________________________________________ > > > seaside mailing list > > > seaside@lists.squeakfoundation.org > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside From johan at inceptive.be Sat Mar 28 09:35:19 2015 From: johan at inceptive.be (Johan Brichau) Date: Sat Mar 28 09:34:28 2015 Subject: [Seaside] Alternative to call: In-Reply-To: References: <05B05148-73A4-4822-BCEF-57ADD6BE72B3@gmail.com> Message-ID: Hi Jeff, Mind that #call: is documented in Seaside to ?replace the receiving component with the argument component?. So, the receiver of #call: is equally important as its argument. Sending #call: to the session presenter is something you can do indeed. It?s not a ?wrong? way to do it (imho), but I think it's cleaner to parameterize your component with the component it should replace when using #call:. Components are intended to be reusable and if some of the callbacks they render are intended to replace another component (e.g. toplevel), then it?s a dependency of the component. So, I would add an instance variable to your component that you assign when you instantiate the component. In your use case, you would pass the toplevel component when instantiating. Immediately, you have made your component more reusable as well, which is the core concept in Seaside ;) cheers Johan > On 28 Mar 2015, at 00:28, J.F. Rick wrote: > > Perhaps I figured it out. I just replaced > self call: something > with > self session presenter call: something > It works, but it may not be the right way to do this. > > Cheers, > > Jeff > > On Fri, Mar 27, 2015 at 7:13 PM J.F. Rick > wrote: > Maybe? :) What's a redirect? I can't really find that either. The main thing I found is this: > http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component > > Cheers, > > Jeff > > > On Fri, Mar 27, 2015 at 1:20 PM Brad > wrote: > Would a redirect work? > > Brad Selfridge > 913-269-2385 > > > On Mar 27, 2015, at 11:40 AM, J.F. Rick > wrote: > > > > This is a silly novice question but I couldn't easily find the answer in the documentation. I'm trying to open up a completely different part of my application. When I do call:, it replaces the component with the new component. I want it to replace everything. What do I do? > > > > Cheers, > > > > Jeff > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150328/ddcc3491/attachment.htm From stephan at stack.nl Sat Mar 28 09:48:48 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sat Mar 28 09:49:01 2015 Subject: [Seaside] Re: Alternative to call: In-Reply-To: References: Message-ID: On 27/03/15 17:40, J.F. Rick wrote: > This is a silly novice question but I couldn't easily find the answer in > the documentation. I'm trying to open up a completely different part of > my application. When I do call:, it replaces the component with the new > component. I want it to replace everything. What do I do? Download a QCMagritte image from ci and take a look at QCComponent and QCPageChoice, starting from addPage:announcement: It assumes you have an announcer in your session class. Stephan From self at je77.com Sat Mar 28 15:53:57 2015 From: self at je77.com (J.F. Rick) Date: Sat Mar 28 15:53:59 2015 Subject: [Seaside] Re: Alternative to call: In-Reply-To: References: Message-ID: Thanks everybody for the guidance. I'm still getting used to the Seaside component model, but my competence is growing. For what I want to do (basically, a thumbnail that takes you to the profile page for that user), using the session presenter seems like the way to go. Cheers, Jeff On Sat, Mar 28, 2015 at 5:49 AM Stephan Eggermont wrote: > On 27/03/15 17:40, J.F. Rick wrote: > > This is a silly novice question but I couldn't easily find the answer in > > the documentation. I'm trying to open up a completely different part of > > my application. When I do call:, it replaces the component with the new > > component. I want it to replace everything. What do I do? > > Download a QCMagritte image from ci and take a look at QCComponent and > QCPageChoice, starting from addPage:announcement: > > It assumes you have an announcer in your session class. > > Stephan > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150328/a77011f6/attachment.htm From johan at inceptive.be Sun Mar 29 16:03:49 2015 From: johan at inceptive.be (Johan Brichau) Date: Sun Mar 29 16:02:54 2015 Subject: [Seaside] Modal dialogs and Updating/closing In-Reply-To: References: Message-ID: > On 12 Mar 2015, at 11:22, Torsten Bergmann wrote: > > I have a modal dialog in Seaside like the Bootstrap one demonstrated > here: > > http://pharo.pharocloud.com/bootstrap/browser/Modal%20example > > When I click on "Save Changes" I would like the server to verify > data (for instance check credentials for a login) and possibly > display a message in the dialog when the input was wrong. > > In such a case I only want to refresh the contents of the dialog > and not a full page refresh, because with a full page refresh the > dialog would not be open again but also I want the updated info > to look smooth without flickering of a full page reload. > > Also when the data is fine after checking on the server the > dialog should close. > > What options do I have/whats the best way to implement this? > Any best practices or simple examples ideally with Bootstrap? The issue here is that when you push the button in the modal dialog, you should already know if it will be a full page request or an ajax request. Because you don?t know that yet, you can only perform an ajax request that returns a script to either perform the full page request, or adds the error message to the dialog: html tbsButton bePrimary; onClick:((html jQuery ajax) serializeForm; script: [ :s | self showErrorMessage ifTrue: [ s << (self scriptForErrorMessageOn: s) ] ifFalse:[ s << (self scriptOnSuccessOn: s) ] ]); with: ?Go!? The script to show the error message would be a ?normal? jquery script that appends some html somewhere (this is application specific). The script to perform the full page request can be built in Seaside as follows: scriptOnSuccessOn: canvas ^ canvas javascript callback: [ ? do whatever you would do in a Seaside callback ? ] cheers Johan From stephan at stack.nl Sun Mar 29 16:56:52 2015 From: stephan at stack.nl (Stephan Eggermont) Date: Sun Mar 29 16:57:21 2015 Subject: [Seaside] Re: Alternative to call: In-Reply-To: References: Message-ID: On 28/03/15 16:53, J.F. Rick wrote: > Thanks everybody for the guidance. I'm still getting used to the Seaside > component model, but my competence is growing. For what I want to do > (basically, a thumbnail that takes you to the profile page for that > user), using the session presenter seems like the way to go. I don't know any Seaside applications doing that, which suggests it might not be the way to go. Doing what you want with pagechoice and announcements is easy. For a complete application using that style, take a look at StoryBoard on ci.inria.fr/pharo-contribution https://vimeo.com/49195501 Stephan From philippe.marschall at gmail.com Mon Mar 30 17:02:41 2015 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Mon Mar 30 17:02:45 2015 Subject: [Seaside] Alternative to call: In-Reply-To: References: Message-ID: On Fri, Mar 27, 2015 at 5:40 PM, J.F. Rick wrote: > This is a silly novice question but I couldn't easily find the answer in the > documentation. I'm trying to open up a completely different part of my > application. When I do call:, it replaces the component with the new > component. I want it to replace everything. What do I do? self session presenter call: myComponent Cheers Philippe From jupiter.jones at mail.com Tue Mar 31 08:15:08 2015 From: jupiter.jones at mail.com (Jupiter Jones) Date: Tue Mar 31 08:15:18 2015 Subject: [Seaside] nginx virtual hosting and seaside Message-ID: Hi All, i?m hoping someone has attempted this before to save me having to learn too much about nginx :) I have multiple URL?s: www.site1.com www.site2.com etc. and multiple applications running in seaside: www.site1.com/Site1App www.site2.com/Site2App etc. This is the bit I don?t know about? Ideally I?d like the urls to map directly to the Seaside application. i.e. www.site1.com serves the application at /Site1App www.site2.com serves the application at /Site2App etc. in my nginx.conf I have: upstream seaside { server 127.0.0.1:8383; } server { listen 80; server_name site1.com www.site1.com ; root /dev/null; location / { proxy_pass http://seaside; proxy_http_version 1.1; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 80; server_name site2.com www.site2.com ; root /dev/null; location / { proxy_pass http://seaside; proxy_http_version 1.1; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } etc. Does anyone know the missing piece of the puzzle? Thanks in advance for any advice. Cheers, Jupiter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150331/57e00f7e/attachment.htm From jupiter.jones at mail.com Tue Mar 31 09:50:46 2015 From: jupiter.jones at mail.com (Jupiter Jones) Date: Tue Mar 31 09:50:57 2015 Subject: [Seaside] nginx virtual hosting and seaside In-Reply-To: References: Message-ID: <41AC18F4-C0C8-4C39-AE02-3BCD4F736652@mail.com> To reply to my own question, this is how I?m doing it now, but would appreciate any advice from someone with more nginx experience. upstream seaside { server 127.0.0.1:8383; } server { listen 80; server_name www.site2.com; root /dev/null; location @seaside { proxy_pass http://seaside; proxy_http_version 1.1; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /Site1App { try_files $uri $uri/ @seaside; } location /files/ { try_files $uri $uri/ @seaside; } if ($uri = /) { rewrite ^(.*)$ /Site1App$1 break; } } > On 31 Mar 2015, at 7:15 pm, Jupiter Jones wrote: > > Hi All, > > i?m hoping someone has attempted this before to save me having to learn too much about nginx :) > > I have multiple URL?s: > www.site1.com > www.site2.com > etc. > > and multiple applications running in seaside: > www.site1.com/Site1App > www.site2.com/Site2App > etc. > > This is the bit I don?t know about? Ideally I?d like the urls to map directly to the Seaside application. i.e. > www.site1.com serves the application at /Site1App > www.site2.com serves the application at /Site2App > etc. > > in my nginx.conf I have: > > upstream seaside { > server 127.0.0.1:8383; > } > server { > listen 80; > server_name site1.com www.site1.com ; > root /dev/null; > location / { > proxy_pass http://seaside ; > proxy_http_version 1.1; > proxy_redirect off; > proxy_set_header Host $host; > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > } > } > server { > listen 80; > server_name site2.com www.site2.com ; > root /dev/null; > location / { > proxy_pass http://seaside ; > proxy_http_version 1.1; > proxy_redirect off; > proxy_set_header Host $host; > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > } > } > etc. > > Does anyone know the missing piece of the puzzle? > > Thanks in advance for any advice. > > Cheers, > > Jupiter > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150331/2d3d5b72/attachment.htm From metaperl at gmail.com Tue Mar 31 12:51:08 2015 From: metaperl at gmail.com (Terrence Brannon) Date: Tue Mar 31 12:51:13 2015 Subject: [Seaside] SubscriptOutOfBounds error when adding class initializer for the sample counter application Message-ID: The Seaside book has a section on automatically registering component s. For some reason, I cannot copy and paste the stack trace, so here is a screenshot of the error . -- Terrence Brannon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150331/b8224f82/attachment.htm From emaringolo at gmail.com Tue Mar 31 14:13:11 2015 From: emaringolo at gmail.com (Esteban A. Maringolo) Date: Tue Mar 31 14:13:53 2015 Subject: [Seaside] nginx virtual hosting and seaside In-Reply-To: <41AC18F4-C0C8-4C39-AE02-3BCD4F736652@mail.com> References: <41AC18F4-C0C8-4C39-AE02-3BCD4F736652@mail.com> Message-ID: 2015-03-31 6:50 GMT-03:00 Jupiter Jones : > > To reply to my own question, this is how I?m doing it now, but would appreciate any advice from someone with more nginx experience. > This is how I'd do it: upstream seaside { server 127.0.0.1:8383; } server { listen 80; server_name www.site2.com; root /dev/null; location /Site1App { proxy_pass http://seaside; proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; } } Regards Esteban A. Maringolo From pdebruic at gmail.com Tue Mar 31 14:18:24 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Tue Mar 31 14:30:00 2015 Subject: [Seaside] Re: SubscriptOutOfBounds error when adding class initializer for the sample counter application In-Reply-To: References: Message-ID: <1427811504174-4816365.post@n4.nabble.com> Hi Terrence, To get a copy of the stack hit the 'Debug' button then right click on the stack and choose 'Copy to clipboard'. The stack you've shown doesn't have enough info to tell what's wrong. In a workspace when you run WebCounter initialize do you get the error? Hope this helps Paul Terrence Brannon wrote > The Seaside book has a section on automatically registering component > <http://book.seaside.st/book/getting-started/pharo/first-component/auto-register> > s. > > For some reason, I cannot copy and paste the stack trace, so here is a > screenshot of the error > <https://www.evernote.com/shard/s309/sh/6cbdcb47-a4d0-4200-8c6a-7a36d29a3703/43a46810da5740fa2dc5cfd7cb93a48a/deep/0/Pharo3.0.image.png> > . > > -- > Terrence Brannon > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/SubscriptOutOfBounds-error-when-adding-class-initializer-for-the-sample-counter-application-tp4816334p4816365.html Sent from the Seaside General mailing list archive at Nabble.com. From metaperl at gmail.com Tue Mar 31 16:14:29 2015 From: metaperl at gmail.com (Terrence Brannon) Date: Tue Mar 31 16:14:32 2015 Subject: [Seaside] Re: SubscriptOutOfBounds error when adding class initializer for the sample counter application In-Reply-To: <1427811504174-4816365.post@n4.nabble.com> References: <1427811504174-4816365.post@n4.nabble.com> Message-ID: There is no error when `Webcount initialize` is executed in a Workspace. Here is the stacktrace: Array(Object)>>errorSubscriptBounds: Array(Object)>>at: Browser>>selectedMessageCategoryName Browser>>compileMessage:notifying: Browser>>contents:notifying: PluggableTextMorph>>acceptTextInModel in Block: [ ... BlockClosure>>ensure: PluggableTextMorph>>acceptTextInModel PluggableTextMorph>>acceptBasic PluggableTextMorph>>accept TextMorphForEditView>>acceptContents TextMorph class>>buildTextEditorKeymapsOn: in Block: [ :morph | morph acceptContents ] BlockClosure>>cull: BlockClosure>>cull:cull: BlockClosure>>cull:cull:cull: KMCategoryBinding>>completeMatch:buffer: KMKeymap>>notifyCompleteMatchTo:buffer: in Block: [ :l | l completeMatch: self buffer: aBuffer ] Array(SequenceableCollection)>>do: KMKeymap>>notifyCompleteMatchTo:buffer: KMKeymap>>onMatchWith:notify:andDo: KMCategory>>onMatchWith:notify:andDo: in Block: [ :entry | entry onMatchWith: anEventBuffer notify...etc... Set>>do: KMCategory>>onMatchWith:notify:andDo: KMCategoryBinding>>verifyMatchWith:notifying:thenDoing: KMDispatcher>>dispatch: in Block: [ :aTarget | ... OrderedCollection>>do: KMDispatcher>>dispatch: KMTarget>>dispatch: KMDispatchChain>>dispatch: in Block: [ :targetToDispatch | ... KMDispatchChain>>do: On Tue, Mar 31, 2015 at 7:18 AM, Paul DeBruicker wrote: > Hi Terrence, > > > To get a copy of the stack hit the 'Debug' button then right click on the > stack and choose 'Copy to clipboard'. > > > The stack you've shown doesn't have enough info to tell what's wrong. > > In a workspace when you run > > WebCounter initialize > > > do you get the error? > > > Hope this helps > > > Paul > > > > > > Terrence Brannon wrote > > The Seaside book has a section on automatically registering component > > < > http://book.seaside.st/book/getting-started/pharo/first-component/auto-register> > ; > > s. > > > > For some reason, I cannot copy and paste the stack trace, so here is a > > screenshot of the error > > < > https://www.evernote.com/shard/s309/sh/6cbdcb47-a4d0-4200-8c6a-7a36d29a3703/43a46810da5740fa2dc5cfd7cb93a48a/deep/0/Pharo3.0.image.png> > ; > > . > > > > -- > > Terrence Brannon > > > > _______________________________________________ > > seaside mailing list > > > seaside@.squeakfoundation > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: > http://forum.world.st/SubscriptOutOfBounds-error-when-adding-class-initializer-for-the-sample-counter-application-tp4816334p4816365.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Terrence Brannon 818-359-0893 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150331/9730037f/attachment.htm From pdebruic at gmail.com Tue Mar 31 16:16:49 2015 From: pdebruic at gmail.com (Paul DeBruicker) Date: Tue Mar 31 16:28:23 2015 Subject: [Seaside] Re: SubscriptOutOfBounds error when adding class initializer for the sample counter application In-Reply-To: References: <1427811504174-4816365.post@n4.nabble.com> Message-ID: <1427818609131-4816423.post@n4.nabble.com> Hi Terrence, Thats good news. Your counter app should be registered and available through a browser. Because there is no error, then the problem lies in how you're executing the code. If in the code browser window you're selecting the line WAAdmin register: self asApplicationAt: 'my_app' and 'doing-it' then that would be the problem. Better to run the 'WebCounter initialize' code fragment Hope this helps Paul Terrence Brannon wrote > There is no error when `Webcount initialize` is executed in a Workspace. > Here is the stacktrace: > > Array(Object)>>errorSubscriptBounds: > Array(Object)>>at: > Browser>>selectedMessageCategoryName > Browser>>compileMessage:notifying: > Browser>>contents:notifying: > PluggableTextMorph>>acceptTextInModel in Block: [ ... > BlockClosure>>ensure: > PluggableTextMorph>>acceptTextInModel > PluggableTextMorph>>acceptBasic > PluggableTextMorph>>accept > TextMorphForEditView>>acceptContents > TextMorph class>>buildTextEditorKeymapsOn: in Block: [ :morph | morph > acceptContents ] > BlockClosure>>cull: > BlockClosure>>cull:cull: > BlockClosure>>cull:cull:cull: > KMCategoryBinding>>completeMatch:buffer: > KMKeymap>>notifyCompleteMatchTo:buffer: in Block: [ :l | l completeMatch: > self buffer: aBuffer ] > Array(SequenceableCollection)>>do: > KMKeymap>>notifyCompleteMatchTo:buffer: > KMKeymap>>onMatchWith:notify:andDo: > KMCategory>>onMatchWith:notify:andDo: in Block: [ :entry | entry > onMatchWith: anEventBuffer notify...etc... > Set>>do: > KMCategory>>onMatchWith:notify:andDo: > KMCategoryBinding>>verifyMatchWith:notifying:thenDoing: > KMDispatcher>>dispatch: in Block: [ :aTarget | ... > OrderedCollection>>do: > KMDispatcher>>dispatch: > KMTarget>>dispatch: > KMDispatchChain>>dispatch: in Block: [ :targetToDispatch | ... > KMDispatchChain>>do: > > > On Tue, Mar 31, 2015 at 7:18 AM, Paul DeBruicker < > pdebruic@ > > wrote: > >> Hi Terrence, >> >> >> To get a copy of the stack hit the 'Debug' button then right click on the >> stack and choose 'Copy to clipboard'. >> >> >> The stack you've shown doesn't have enough info to tell what's wrong. >> >> In a workspace when you run >> >> WebCounter initialize >> >> >> do you get the error? >> >> >> Hope this helps >> >> >> Paul >> >> >> >> >> >> Terrence Brannon wrote >> > The Seaside book has a section on automatically registering component >> > < >> http://book.seaside.st/book/getting-started/pharo/first-component/auto-register> >> ; >> > s. >> > >> > For some reason, I cannot copy and paste the stack trace, so here is a >> > screenshot of the error >> > < >> https://www.evernote.com/shard/s309/sh/6cbdcb47-a4d0-4200-8c6a-7a36d29a3703/43a46810da5740fa2dc5cfd7cb93a48a/deep/0/Pharo3.0.image.png> >> ; >> > . >> > >> > -- >> > Terrence Brannon >> > >> > _______________________________________________ >> > seaside mailing list >> >> > seaside@.squeakfoundation >> >> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/SubscriptOutOfBounds-error-when-adding-class-initializer-for-the-sample-counter-application-tp4816334p4816365.html >> Sent from the Seaside General mailing list archive at Nabble.com. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> > > > > -- > Terrence Brannon > 818-359-0893 (cell) > > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/SubscriptOutOfBounds-error-when-adding-class-initializer-for-the-sample-counter-application-tp4816334p4816423.html Sent from the Seaside General mailing list archive at Nabble.com.