From johan at inceptive.be Fri Jul 1 05:36:55 2016 From: johan at inceptive.be (Johan Brichau) Date: Fri Jul 1 05:36:59 2016 Subject: Seaside-Security for GemStone [WAS] Re: [Seaside] Seaside Error - No Secure Generator Available In-Reply-To: References: Message-ID: <8C2C2E4A-C854-405E-98E9-419CD8820320@inceptive.be> > On 30 Jun 2016, at 20:25, Mariano Martinez Peck wrote: > > Nice package!! I wasn't aware of it. It contains some nice filters. Do you know if it works in GemStone too (from what I could see in the configuration, it's only for Pharo)? Everything in the Seaside-Security package should work fine in GemStone. The secure key generator is in the Seaside-Pharo-Security and only works on Pharo, though I don?t think porting it GemStone would be difficult. Philippe might be able to comment a bit more on this, as he is the author. cheers Johan From philippe.marschall at gmail.com Fri Jul 1 12:54:27 2016 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Fri Jul 1 12:54:31 2016 Subject: [Seaside] Seaside Error - No Secure Generator Available In-Reply-To: <213F7E1D-C891-4816-ACE0-C7553427D80A@inceptive.be> References: <000601d1d2dc$53902a10$fab07e30$@chaparralwest.com> <38B9975C-DB0B-4EC6-8C5B-BD218468350C@me.com> <008c01d1d2f5$a094c5a0$e1be50e0$@chaparralwest.com> <213F7E1D-C891-4816-ACE0-C7553427D80A@inceptive.be> Message-ID: Exactly. We use the Pharo/Squeak Security package. On Linux and macOS we have a secure way to seed (/dev/urandom) but we do not on Windows. The reasoning was if people load Seaside-Security they expect to have photographically secure session ids. Rather than silently not doing this we opted to throw an exception. Cheers Philippe On Thu, Jun 30, 2016 at 7:45 PM, Johan Brichau wrote: > Hi, > > This should only happen if you have Seaside-Security loaded. > Can you confirm that this is the case? > > I don?t have a Windows 10 machine, so it might take some to time figure > this one out. > > Johan > > On 30 Jun 2016, at 19:34, mldavis@chaparralwest.com wrote: > > David, > > Many thanks. I would never have figured this out. > > It worked exactly as you said, in all my images. Some of these are on > different machines and yet, they all suddenly started with this same error, > all the same day???? At least two of these have been running for over a > week without the error (starting, stopping, making changes etc). I wonder > what triggered it?. > > Anyway thank you so much: It was in Seaside 3.2 loaded into Pharo 5 build > 50760 running on Zinc server on Windows 10 latest stable. > > Regards, > > mike > > *From:* David Pennington [mailto:lhdavid@me.com ] > *Sent:* Thursday, June 30, 2016 9:21 AM > *To:* mldavis@chaparralwest.com; Seaside - general discussion < > seaside@lists.squeakfoundation.org> > *Subject:* Re: [Seaside] Seaside Error - No Secure Generator Available > > I had this problem when running seaside in my VAST Smalltalk image. I was > advised as follows by Instantiations: > > I can reproduce this. > Looks like Seaside wants to generate random numbers to use as keys for > session caches. If a secure RNG (via OpenSSL) is not available in Vast > then it produces this walkback...even for http. > If it's not found at startup, then it installs a > 'WANoSecureKeyGeneratorAvailable' which produces an error when asked for a > key. > > To get around this, try changing the key generator method to the following > below. This will force it to fallback to using EsRandom as the RNG. > In the meantime, we will revisit this internally to see if we can > disconnect the OpenSSL requirement from the session cache keys. > Thanks for bringing this up....please let me know if the change described > below solves your issue. > > WANoSecureKeyGeneratorAvailable>>keyOfLength: anInteger > ^super keyOfLength: anInteger > > Long Haired David > A.K.A. David Pennington > lhdavid@icloud.com > > > > > On 30 Jun 2016, at 15:33, mldavis@chaparralwest.com wrote: > > Seaside 3.1 & 3.2 running on Windows 10 > > Since yesterday, all of my images of Seaside on two different machines are > getting this error when I connect to them from http://localhost:8080 : > > Seaside Walkback > > > ---------------------------------------------------------------------------------- > WAError: no secure key generator availble because seeding failed > Debug Full Stack > > Stack Trace > thisContext > WANoSecureKeyGeneratorAvailable class(GRObject class)>>error: > self > WANoSecureKeyGeneratorAvailable > thisContext > WANoSecureKeyGeneratorAvailable(GRObject)>>error: > self > a WANoSecureKeyGeneratorAvailable > thisContext > WANoSecureKeyGeneratorAvailable>>keyOfLength: > self > a WANoSecureKeyGeneratorAvailable > thisContext > WAHashCache>>store: > self > a WAHashCache > thisContext > [ cache store: anObject ] in WAMutualExclusionCache>>store: > self > a WAMutualExclusionCache > > ----------------------------------------------------------------------------- > > The multi image & different machine impact makes me wonder if this was > caused by a Windows 10 update, which come without warning now? > > Can anyone help me? > > Thanks, mike > > > > Virus-free. www.avast.com > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > Virus-free. www.avast.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/20160701/672d3e7e/attachment-0001.htm From philippe.marschall at gmail.com Fri Jul 1 12:56:51 2016 From: philippe.marschall at gmail.com (Philippe Marschall) Date: Fri Jul 1 12:56:54 2016 Subject: Seaside-Security for GemStone [WAS] Re: [Seaside] Seaside Error - No Secure Generator Available In-Reply-To: <8C2C2E4A-C854-405E-98E9-419CD8820320@inceptive.be> References: <8C2C2E4A-C854-405E-98E9-419CD8820320@inceptive.be> Message-ID: On Fri, Jul 1, 2016 at 7:36 AM, Johan Brichau wrote: > >> On 30 Jun 2016, at 20:25, Mariano Martinez Peck wrote: >> >> Nice package!! I wasn't aware of it. It contains some nice filters. Do you know if it works in GemStone too (from what I could see in the configuration, it's only for Pharo)? > > Everything in the Seaside-Security package should work fine in GemStone. > The secure key generator is in the Seaside-Pharo-Security and only works on Pharo, though I don?t think porting it GemStone would be difficult. IIRC GemStone has cryptographically secure session ids out of the box. No need to port. Cheers Philippe From marianopeck at gmail.com Fri Jul 1 14:34:13 2016 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri Jul 1 14:34:15 2016 Subject: Seaside-Security for GemStone [WAS] Re: [Seaside] Seaside Error - No Secure Generator Available In-Reply-To: <8C2C2E4A-C854-405E-98E9-419CD8820320@inceptive.be> References: <8C2C2E4A-C854-405E-98E9-419CD8820320@inceptive.be> Message-ID: On Fri, Jul 1, 2016 at 2:36 AM, Johan Brichau wrote: > > > On 30 Jun 2016, at 20:25, Mariano Martinez Peck > wrote: > > > > Nice package!! I wasn't aware of it. It contains some nice filters. Do > you know if it works in GemStone too (from what I could see in the > configuration, it's only for Pharo)? > > Everything in the Seaside-Security package should work fine in GemStone. > The secure key generator is in the Seaside-Pharo-Security and only works > on Pharo, though I don?t think porting it GemStone would be difficult. > Philippe might be able to comment a bit more on this, as he is the author. > > Cool. I am checking the conf now but it seems this was added in 3.2 only? Do you know if this could work on 3.1.5 ? Thanks! -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160701/70b335ee/attachment.htm From lasmiste at gmail.com Mon Jul 18 14:26:40 2016 From: lasmiste at gmail.com (Dave) Date: Mon Jul 18 15:09:52 2016 Subject: [Seaside] Putting a javascript variable in a JQuery ID Message-ID: <1468852000573-4906951.post@n4.nabble.com> Hi there I have to read a javascript variable (myResultingID), this is the script: html html: '' and I have to use it as a JQuery id, but if I write: html jQuery id: 'myResultingID', Seaside generates $('#myResultingID') see: html html: '' So I found an ugly solution i.e. replacing the Seaside generated string with the javascript right concatenation, see here: html html: '' Is there a better way? Thanks Dave -- View this message in context: http://forum.world.st/Putting-a-javascript-variable-in-a-JQuery-ID-tp4906951.html Sent from the Seaside General mailing list archive at Nabble.com. From pdebruic at gmail.com Mon Jul 18 14:57:14 2016 From: pdebruic at gmail.com (Paul DeBruicker) Date: Mon Jul 18 15:40:25 2016 Subject: [Seaside] Re: Putting a javascript variable in a JQuery ID In-Reply-To: <1468852000573-4906951.post@n4.nabble.com> References: <1468852000573-4906951.post@n4.nabble.com> Message-ID: <1468853834799-4906962.post@n4.nabble.com> I think the #expression: method will do what you want. e.g. html jQuery expression: 'myResultingId' Dave wrote > Hi there > I have to read a javascript variable (myResultingID), this is the script: > > html > html: > ' > ' > > > > and I have to use it as a JQuery id, but if I write: html jQuery id: > 'myResultingID', Seaside generates $('#myResultingID') see: > > html > html: > ' > ' > > > > > So I found an ugly solution i.e. replacing the Seaside generated string > with the javascript right concatenation, see here: > > > html > html: > ' > ' > > Is there a better way? > Thanks > > Dave -- View this message in context: http://forum.world.st/Putting-a-javascript-variable-in-a-JQuery-ID-tp4906951p4906962.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Mon Jul 18 15:44:22 2016 From: johan at inceptive.be (Johan Brichau) Date: Mon Jul 18 15:44:26 2016 Subject: [Seaside] Re: Putting a javascript variable in a JQuery ID In-Reply-To: <1468853834799-4906962.post@n4.nabble.com> References: <1468852000573-4906951.post@n4.nabble.com> <1468853834799-4906962.post@n4.nabble.com> Message-ID: <562534ED-C92E-462C-B6C2-48256A4C7B9B@inceptive.be> Perhaps: html jQuery expression: (html javascript alias: ?myResultingId?) cheers Johan ps: I don?t see any text of your examples (copy/paste error?) > On 18 Jul 2016, at 16:57, Paul DeBruicker wrote: > > I think the #expression: method will do what you want. > > > e.g. > > html jQuery expression: 'myResultingId' > > > > > > > Dave wrote >> Hi there >> I have to read a javascript variable (myResultingID), this is the script: >> >> html >> html: >> ' > >> ' >> >> >> >> and I have to use it as a JQuery id, but if I write: html jQuery id: >> 'myResultingID', Seaside generates $('#myResultingID') see: >> >> html >> html: >> ' > >> ' >> >> >> >> >> So I found an ugly solution i.e. replacing the Seaside generated string >> with the javascript right concatenation, see here: >> >> >> html >> html: >> ' > >> ' >> >> Is there a better way? >> Thanks >> >> Dave > > > > > > -- > View this message in context: http://forum.world.st/Putting-a-javascript-variable-in-a-JQuery-ID-tp4906951p4906962.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/20160718/8474c7b1/attachment-0001.htm From lasmiste at gmail.com Mon Jul 18 16:20:36 2016 From: lasmiste at gmail.com (Dave) Date: Mon Jul 18 17:03:48 2016 Subject: [Seaside] Re: Putting a javascript variable in a JQuery ID In-Reply-To: <562534ED-C92E-462C-B6C2-48256A4C7B9B@inceptive.be> References: <1468852000573-4906951.post@n4.nabble.com> <1468853834799-4906962.post@n4.nabble.com> <562534ED-C92E-462C-B6C2-48256A4C7B9B@inceptive.be> Message-ID: <1468858836388-4906987.post@n4.nabble.com> Thanks Johan, it works. cheers Dave Johan Brichau-2 wrote > Perhaps: > > html jQuery expression: (html javascript alias: ?myResultingId?) > > cheers > Johan > > ps: I don?t see any text of your examples (copy/paste error?) > >> On 18 Jul 2016, at 16:57, Paul DeBruicker < > pdebruic@ > > wrote: >> >> I think the #expression: method will do what you want. >> >> >> e.g. >> >> html jQuery expression: 'myResultingId' >> >> >> >> >> >> >> Dave wrote >>> Hi there >>> I have to read a javascript variable (myResultingID), this is the >>> script: >>> >>> html >>> html: >>> ' >> >>> ' >>> >>> >>> >>> and I have to use it as a JQuery id, but if I write: html jQuery id: >>> 'myResultingID', Seaside generates $('#myResultingID') see: >>> >>> html >>> html: >>> ' >> >>> ' >>> >>> >>> >>> >>> So I found an ugly solution i.e. replacing the Seaside generated string >>> with the javascript right concatenation, see here: >>> >>> >>> html >>> html: >>> ' >> >>> ' >>> >>> Is there a better way? >>> Thanks >>> >>> Dave >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Putting-a-javascript-variable-in-a-JQuery-ID-tp4906951p4906962.html >> <http://forum.world.st/Putting-a-javascript-variable-in-a-JQuery-ID-tp4906951p4906962.html> >> Sent from the Seaside General mailing list archive at Nabble.com >> <http://nabble.com/>. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation > <mailto: > seaside@.squeakfoundation > > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> <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/Putting-a-javascript-variable-in-a-JQuery-ID-tp4906951p4906987.html Sent from the Seaside General mailing list archive at Nabble.com. From oswallcr at yahoo.com Wed Jul 20 14:51:01 2016 From: oswallcr at yahoo.com (Oswall Verny Arguedas C.) Date: Wed Jul 20 14:51:05 2016 Subject: [Seaside] Small example of components References: <990484672.2420412.1469026261694.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <990484672.2420412.1469026261694.JavaMail.yahoo@mail.yahoo.com> Small example of components. I respectfully ask if they have a small example to seaside.I have a form with an embedded component. The value (instance) of this embedded component, the user can select it using anchor and callback.The callback calls a list, the user chooses the new instance and returns to the form.In the book "Dynamic Web Development with Seaside" We have a list called a form and edit it by example and return to the list.Regards,Oswall -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160720/93d6087b/attachment.htm From pdebruic at gmail.com Wed Jul 20 15:45:34 2016 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Jul 20 16:29:00 2016 Subject: [Seaside] Re: Small example of components In-Reply-To: <990484672.2420412.1469026261694.JavaMail.yahoo@mail.yahoo.com> References: <990484672.2420412.1469026261694.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1469029534770-4907265.post@n4.nabble.com> Hello Oswall, If you have Seaside tests loaded in your image and a server running on port 8080 you can go to http://127.0.0.1:8080/tests/functional and see an example of what I think you're describing. In the browser the select at the top change the component under test, and the region below the horizontal line is the component under test. The test cover most of Seaside's functionality so you can see how to implement a wide variety of use cases. At the bottom of the browser window you can click 'Halos' to see the which components are rendered and using the halo controls see and edit the code doing the rendering. Back in the image the components that can be under test are all subclasses of WAFunctionalTest and the control that renders and changes among the various tests is WAAllFunctionalTests. So you can see the Seaside code in the image if you prefer. Hope this helps Paul oswall wrote > Small example of components. I respectfully ask if they have a small > example to seaside.I have a form with an embedded component. The value > (instance) of this embedded component, the user can select it using anchor > and callback.The callback calls a list, the user chooses the new instance > and returns to the form.In the book "Dynamic Web Development with Seaside" > We have a list called a form and edit it by example and return to the > list.Regards,Oswall > _______________________________________________ > seaside mailing list > seaside@.squeakfoundation > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside -- View this message in context: http://forum.world.st/Small-example-of-components-tp4907248p4907265.html Sent from the Seaside General mailing list archive at Nabble.com. From lasmiste at gmail.com Wed Jul 20 21:03:30 2016 From: lasmiste at gmail.com (Dave) Date: Wed Jul 20 21:46:57 2016 Subject: [Seaside] Getting json after an ajax call Message-ID: <1469048610018-4907286.post@n4.nabble.com> Hi folks, I can't retrieve a json from the server. I have an ajax call, on success I want to get some json in return. Here is a sample code: html jQuery ajax callback: [ ... ] ; onSuccess: (html jQuery getJson json: [ :js | js object:[(Dictionary new at:'aSampleKey' put:'aSampleValue'; yourself) asJson] ]; onSuccess: 'console.log(arguments[0])') Unfortunately the console prints Object {} I guess there is something wrong with js object:[] but I've no idea of what Dave -- View this message in context: http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286.html Sent from the Seaside General mailing list archive at Nabble.com. From pdebruic at gmail.com Wed Jul 20 21:33:40 2016 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Jul 20 22:17:07 2016 Subject: [Seaside] Re: Getting json after an ajax call In-Reply-To: <1469048610018-4907286.post@n4.nabble.com> References: <1469048610018-4907286.post@n4.nabble.com> Message-ID: <1469050420659-4907289.post@n4.nabble.com> try 'console.log(JSON.stringify(arguments[0])' Dave wrote > Hi folks, > > I can't retrieve a json from the server. I have an ajax call, on success I > want to get some json in return. > > Here is a sample code: > > html jQuery ajax > callback: [ ... ] ; > onSuccess: > (html jQuery getJson > json: [ :js | js object:[(Dictionary new at:'aSampleKey' > put:'aSampleValue'; yourself) asJson] ]; > onSuccess: 'console.log(arguments[0])') > > Unfortunately the console prints Object {} > > I guess there is something wrong with js object:[] but I've no idea of > what > > Dave -- View this message in context: http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907289.html Sent from the Seaside General mailing list archive at Nabble.com. From pdebruic at gmail.com Wed Jul 20 21:34:40 2016 From: pdebruic at gmail.com (Paul DeBruicker) Date: Wed Jul 20 22:18:07 2016 Subject: [Seaside] Re: Getting json after an ajax call In-Reply-To: <1469050420659-4907289.post@n4.nabble.com> References: <1469048610018-4907286.post@n4.nabble.com> <1469050420659-4907289.post@n4.nabble.com> Message-ID: <1469050480572-4907290.post@n4.nabble.com> errr... missing closing parenthesis in the previous email 'console.log(JSON.stringify(arguments[0]))' Paul DeBruicker wrote > try > > 'console.log(JSON.stringify(arguments[0])' > > > > > Dave wrote >> Hi folks, >> >> I can't retrieve a json from the server. I have an ajax call, on success >> I want to get some json in return. >> >> Here is a sample code: >> >> html jQuery ajax >> callback: [ ... ] ; >> onSuccess: >> (html jQuery getJson >> json: [ :js | js object:[(Dictionary new at:'aSampleKey' >> put:'aSampleValue'; yourself) asJson] ]; >> onSuccess: 'console.log(arguments[0])') >> >> Unfortunately the console prints Object {} >> >> I guess there is something wrong with js object:[] but I've no idea of >> what >> >> Dave -- View this message in context: http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907290.html Sent from the Seaside General mailing list archive at Nabble.com. From lasmiste at gmail.com Thu Jul 21 05:41:30 2016 From: lasmiste at gmail.com (Dave) Date: Thu Jul 21 06:25:00 2016 Subject: [Seaside] Re: Getting json after an ajax call In-Reply-To: <1469050480572-4907290.post@n4.nabble.com> References: <1469048610018-4907286.post@n4.nabble.com> <1469050420659-4907289.post@n4.nabble.com> <1469050480572-4907290.post@n4.nabble.com> Message-ID: <1469079690530-4907306.post@n4.nabble.com> Hi Paul, No change. The console shows {} I was expecting {"aSampleKey":"aSampleValue"} Dave Paul DeBruicker wrote > errr... missing closing parenthesis in the previous email > > 'console.log(JSON.stringify(arguments[0]))' > > > > > > Paul DeBruicker wrote >> try >> >> 'console.log(JSON.stringify(arguments[0])' >> >> >> >> >> Dave wrote >>> Hi folks, >>> >>> I can't retrieve a json from the server. I have an ajax call, on success >>> I want to get some json in return. >>> >>> Here is a sample code: >>> >>> html jQuery ajax >>> callback: [ ... ] ; >>> onSuccess: >>> (html jQuery getJson >>> json: [ :js | js object:[(Dictionary new at:'aSampleKey' >>> put:'aSampleValue'; yourself) asJson] ]; >>> onSuccess: 'console.log(arguments[0])') >>> >>> Unfortunately the console prints Object {} >>> >>> I guess there is something wrong with js object:[] but I've no idea of >>> what >>> >>> Dave -- View this message in context: http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907306.html Sent from the Seaside General mailing list archive at Nabble.com. From johan at inceptive.be Thu Jul 21 07:22:26 2016 From: johan at inceptive.be (Johan Brichau) Date: Thu Jul 21 07:22:31 2016 Subject: [Seaside] Re: Getting json after an ajax call In-Reply-To: <1469079690530-4907306.post@n4.nabble.com> References: <1469048610018-4907286.post@n4.nabble.com> <1469050420659-4907289.post@n4.nabble.com> <1469050480572-4907290.post@n4.nabble.com> <1469079690530-4907306.post@n4.nabble.com> Message-ID: <2562130B-4CE3-4851-B21B-5AFFCB20BB83@inceptive.be> Dave, You are mixing the use of the JSON canvas api and the conversion of Smalltalk object to JSON. Take a look at an example in JQJsonFunctionalTest>>renderJsonCallbackOn: or in WAJsonRenderingTest Either do: js object: [ js key: ?aSampleKey? value: ?aSampleValue? ] or: js render: (Dictionary new at:?aSampleKey? put: ?aSampleValue?; yourself) The first one uses the json canvas api to directly generate JSON on the document. The second one renders the JSON representation of Smalltalk objects on the document. cheers Johan > On 21 Jul 2016, at 07:41, Dave wrote: > > Hi Paul, > No change. The console shows {} > > I was expecting {"aSampleKey":"aSampleValue"} > Dave > > > Paul DeBruicker wrote >> errr... missing closing parenthesis in the previous email >> >> 'console.log(JSON.stringify(arguments[0]))' >> >> >> >> >> >> Paul DeBruicker wrote >>> try >>> >>> 'console.log(JSON.stringify(arguments[0])' >>> >>> >>> >>> >>> Dave wrote >>>> Hi folks, >>>> >>>> I can't retrieve a json from the server. I have an ajax call, on success >>>> I want to get some json in return. >>>> >>>> Here is a sample code: >>>> >>>> html jQuery ajax >>>> callback: [ ... ] ; >>>> onSuccess: >>>> (html jQuery getJson >>>> json: [ :js | js object:[(Dictionary new at:'aSampleKey' >>>> put:'aSampleValue'; yourself) asJson] ]; >>>> onSuccess: 'console.log(arguments[0])') >>>> >>>> Unfortunately the console prints Object {} >>>> >>>> I guess there is something wrong with js object:[] but I've no idea of >>>> what >>>> >>>> Dave > > > > > > -- > View this message in context: http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907306.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/20160721/67e92103/attachment-0001.htm From lasmiste at gmail.com Thu Jul 21 08:16:24 2016 From: lasmiste at gmail.com (Dave) Date: Thu Jul 21 08:59:55 2016 Subject: [Seaside] Re: Getting json after an ajax call In-Reply-To: <2562130B-4CE3-4851-B21B-5AFFCB20BB83@inceptive.be> References: <1469048610018-4907286.post@n4.nabble.com> <1469050420659-4907289.post@n4.nabble.com> <1469050480572-4907290.post@n4.nabble.com> <1469079690530-4907306.post@n4.nabble.com> <2562130B-4CE3-4851-B21B-5AFFCB20BB83@inceptive.be> Message-ID: <1469088984424-4907313.post@n4.nabble.com> Thanks Johan, now it's clear. I had previously looked at JQJsonFunctionalTest>>renderJsonCallbackOn: but it didn't clarify a lot. WAJsonRenderingTest is not in the 'Base' Seaside package, I had to download the full one Gofer new url:'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; package: 'ConfigurationOfSeaside3'; load. ((Smalltalk at: #ConfigurationOfSeaside3) project version: #stable) load: 'CI'. Thank you very much Dave Johan Brichau-2 wrote > Dave, > > You are mixing the use of the JSON canvas api and the conversion of > Smalltalk object to JSON. > Take a look at an example in JQJsonFunctionalTest>>renderJsonCallbackOn: > or in WAJsonRenderingTest > > Either do: > > js object: [ js key: ?aSampleKey? value: ?aSampleValue? ] > > or: > > js render: (Dictionary new at:?aSampleKey? put: ?aSampleValue?; yourself) > > The first one uses the json canvas api to directly generate JSON on the > document. The second one renders the JSON representation of Smalltalk > objects on the document. > > cheers > Johan > >> On 21 Jul 2016, at 07:41, Dave < > lasmiste@ > > wrote: >> >> Hi Paul, >> No change. The console shows {} >> >> I was expecting {"aSampleKey":"aSampleValue"} >> Dave >> >> >> Paul DeBruicker wrote >>> errr... missing closing parenthesis in the previous email >>> >>> 'console.log(JSON.stringify(arguments[0]))' >>> >>> >>> >>> >>> >>> Paul DeBruicker wrote >>>> try >>>> >>>> 'console.log(JSON.stringify(arguments[0])' >>>> >>>> >>>> >>>> >>>> Dave wrote >>>>> Hi folks, >>>>> >>>>> I can't retrieve a json from the server. I have an ajax call, on >>>>> success >>>>> I want to get some json in return. >>>>> >>>>> Here is a sample code: >>>>> >>>>> html jQuery ajax >>>>> callback: [ ... ] ; >>>>> onSuccess: >>>>> (html jQuery getJson >>>>> json: [ :js | js object:[(Dictionary new at:'aSampleKey' >>>>> put:'aSampleValue'; yourself) asJson] ]; >>>>> onSuccess: 'console.log(arguments[0])') >>>>> >>>>> Unfortunately the console prints Object {} >>>>> >>>>> I guess there is something wrong with js object:[] but I've no idea of >>>>> what >>>>> >>>>> Dave >> >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907306.html >> <http://forum.world.st/Getting-json-after-an-ajax-call-tp4907286p4907306.html> >> Sent from the Seaside General mailing list archive at Nabble.com >> <http://nabble.com/>. >> _______________________________________________ >> seaside mailing list >> > seaside@.squeakfoundation > <mailto: > seaside@.squeakfoundation > > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> <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/Getting-json-after-an-ajax-call-tp4907286p4907313.html Sent from the Seaside General mailing list archive at Nabble.com. From sistecaq at gmail.com Thu Jul 21 13:04:30 2016 From: sistecaq at gmail.com (Oswall Verny Arguedas C.) Date: Thu Jul 21 13:04:35 2016 Subject: [Seaside] Re: Small example of components In-Reply-To: <1469029534770-4907265.post@n4.nabble.com> References: <990484672.2420412.1469026261694.JavaMail.yahoo@mail.yahoo.com> <1469029534770-4907265.post@n4.nabble.com> Message-ID: -SOLVED- Thank you very much Paul for your time I solved it. Missing was the "ifTrue:" statement when returns the response "self answer: true". Ah .. new smalltalker. Oswall 2016-07-20 9:45 GMT-06:00 Paul DeBruicker : > Hello Oswall, > > > If you have Seaside tests loaded in your image and a server running on port > 8080 you can go to > > http://127.0.0.1:8080/tests/functional > > and see an example of what I think you're describing. > > In the browser the select at the top change the component under test, and > the region below the horizontal line is the component under test. The test > cover most of Seaside's functionality so you can see how to implement a > wide > variety of use cases. At the bottom of the browser window you can click > 'Halos' to see the which components are rendered and using the halo > controls > see and edit the code doing the rendering. > > > Back in the image the components that can be under test are all subclasses > of WAFunctionalTest and the control that renders and changes among the > various tests is WAAllFunctionalTests. So you can see the Seaside code in > the image if you prefer. > > > Hope this helps > > > Paul > > > > > > > > oswall wrote > > Small example of components. I respectfully ask if they have a small > > example to seaside.I have a form with an embedded component. The value > > (instance) of this embedded component, the user can select it using > anchor > > and callback.The callback calls a list, the user chooses the new instance > > and returns to the form.In the book "Dynamic Web Development with > Seaside" > > We have a list called a form and edit it by example and return to the > > list.Regards,Oswall > > _______________________________________________ > > seaside mailing list > > > seaside@.squeakfoundation > > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > > > -- > View this message in context: > http://forum.world.st/Small-example-of-components-tp4907248p4907265.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 > -- Ing. Oswall Verny Arguedas C Intranets Corporativas M?viles: 8852 - 6773 y 7203 - 2531 Tel?fono: 2268 - 5659 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160721/b3782d37/attachment.htm From marianopeck at gmail.com Fri Jul 22 20:38:31 2016 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri Jul 22 20:38:34 2016 Subject: [Seaside] Twitter Bootstrap and Accordion In-Reply-To: References: Message-ID: Hi Torsten, Thanks for your accordion! I was taking a look to it and I have a question: I made sure to keep using the same instance of TBSAccordion but the problem I have is that when I collapse or expand, that is lost as soon as I refresh the page or the containing component, which makes it useless for me. So.. is there a way the component itself knows how to memorize whether it was expanded or not? I see TBSAccordionItem has a 'isCollapsed' instVar but it loooks to be used only at #initialize. Thoughts? Thanks! On Wed, Jun 3, 2015 at 8:08 AM, Torsten Bergmann wrote: > Hi Thomas + Seaside list, > > I implemented an accordion widget in bootstrap project. One can use a > block or > a seaside component for the items of the accordion. > > accordion := TBSAccordion new. > accordion > add: [:html | html text: 'Some content' ] title: 'A block'; > add: [:html | html text: 'Some more content' ] title: 'Item 2'; > add: WACounter new title: 'A component'. > > If required it is possible to do own custom rendering by providing a > subclass of > TBSAccordionItem and adding this to the accordion using #addItem: > instead of using #add:title: > > A demo is online: > > http://pharo.pharocloud.com/bootstrap/browser/Accordion > > Just update the code to the latest version or grab the latest image from > PharoLauncher or CI > (https://ci.inria.fr/pharo-contribution/job/Bootstrap/) > > Hope this helps getting started or use as a template for own experiments. > > > Thx > T. > > > _______________________________________________ > 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/20160722/8f173228/attachment.htm From marianopeck at gmail.com Fri Jul 22 20:51:15 2016 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Fri Jul 22 20:51:19 2016 Subject: [Seaside] Twitter Bootstrap and Accordion In-Reply-To: References: Message-ID: Looks like I found a way :) Modifying TBSAccordionItem to the following: TBSAccordionItem >> renderHeadingOn: html html tbsPanelHeading: [ html anchor attributeAt: 'data-toggle' ifAbsentPut: 'collapse'; *onClick: (html jQuery ajax* * script: [ :s | * * self isCollapsed: self isCollapsed not.* * s << JSStream on: '$(''#', self uniqueIdString, ''').collapse()'* * ]);* url: '#', self uniqueIdString; with: self title ] Added the onClick: part assuming that #renderBodyOn: html was already doing: self isCollapsed ifFalse: [styleClasses := styleClasses, ' in']. What do you think? On Fri, Jul 22, 2016 at 5:38 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote: > Hi Torsten, > > Thanks for your accordion! I was taking a look to it and I have a > question: > > I made sure to keep using the same instance of TBSAccordion but the > problem I have is that when I collapse or expand, that is lost as soon as I > refresh the page or the containing component, which makes it useless for > me. So.. is there a way the component itself knows how to memorize whether > it was expanded or not? I see TBSAccordionItem has a 'isCollapsed' > instVar but it loooks to be used only at #initialize. > > Thoughts? > > Thanks! > > > > On Wed, Jun 3, 2015 at 8:08 AM, Torsten Bergmann wrote: > >> Hi Thomas + Seaside list, >> >> I implemented an accordion widget in bootstrap project. One can use a >> block or >> a seaside component for the items of the accordion. >> >> accordion := TBSAccordion new. >> accordion >> add: [:html | html text: 'Some content' ] title: 'A block'; >> add: [:html | html text: 'Some more content' ] title: 'Item 2'; >> add: WACounter new title: 'A component'. >> >> If required it is possible to do own custom rendering by providing a >> subclass of >> TBSAccordionItem and adding this to the accordion using #addItem: >> instead of using #add:title: >> >> A demo is online: >> >> http://pharo.pharocloud.com/bootstrap/browser/Accordion >> >> Just update the code to the latest version or grab the latest image from >> PharoLauncher or CI >> (https://ci.inria.fr/pharo-contribution/job/Bootstrap/) >> >> Hope this helps getting started or use as a template for own experiments. >> >> >> Thx >> T. >> >> >> _______________________________________________ >> seaside mailing list >> seaside@lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> > > > -- > Mariano > http://marianopeck.wordpress.com > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20160722/6b1d9a54/attachment-0001.htm From manaa.sabine at gmail.com Mon Jul 25 09:52:38 2016 From: manaa.sabine at gmail.com (Sabine Manaa) Date: Mon Jul 25 10:36:38 2016 Subject: [Seaside] show spinner until something is done Message-ID: <1469440358216-4907725.post@n4.nabble.com> I create pdf reports which are converted to pngs for small previews (and print/mail/export). When the user clicks at "report", there are several pdf reports and their pngs generated in the background. In this moment (When the user clicks at "report"), the application changes to the reports page. But in this moment, the repots possibly are not yet finished :-) So, I want to show a spinner/counter for each of the reports and update each in the moment when the png is ready. I succeeded with all but the spinner/counter and the moment when the page renders. Its to late. My problem is that the page is rendered only in the moment, when the code is run. Not earlier. I assume the onLoad is to late? I tried several things for several hours :-( and now I want to ask the community. I reduced the problem to a very simple example: 2 methods with the question: how to change this code to update the counter 1,2,3,4... Very curious about a solution >>renderContentOn: html html div id: 'image'; with: [ html text: 'Waiting for the report' ]. html div id: 'counter'; with: [ html text: 'This should count 1,2,3...' ]. html document addLoadScript: (html jQuery ajax script: [ :script | self loadScriptIndex: 1 script: script ]) >>loadScriptIndex: anIndex script: s | theIndex | (Delay forMilliseconds: 100) wait. theIndex := anIndex. "aPngFilename asFileReference exists" anIndex > 50 "simulate file is there after some time" ifTrue: [ s << (s jQuery: #image) replaceWith: [ :h | h text: theIndex asString. h image altText: 'Report'; width: '100%'; url: 'http://localhost/reports/a.png' ] ] ifFalse: [ theIndex := theIndex + 1. s << (s jQuery: #counter) replaceWith: [ :h | h div id: #counter; with: [ h text: theIndex asString ] ]. self loadScriptIndex: theIndex script: s and possibly registerTestApplication | theApplication | theApplication := WAAdmin register: RKATestView asApplicationAt: 'RKT'. theApplication addLibrary: JQDeploymentLibrary; addLibrary: JQUiDeploymentLibrary. ^ theApplication -- View this message in context: http://forum.world.st/show-spinner-until-something-is-done-tp4907725.html Sent from the Seaside General mailing list archive at Nabble.com. From maarten.mostert at wanadoo.fr Mon Jul 25 20:56:27 2016 From: maarten.mostert at wanadoo.fr (Maarten Mostert) Date: Mon Jul 25 20:56:30 2016 Subject: [Seaside] show spinner until something is done In-Reply-To: <1469440358216-4907725.post@n4.nabble.com> References: <1469440358216-4907725.post@n4.nabble.com> Message-ID: <1F306801-4489-485F-86FE-144247AA3778@wanadoo.fr> Hello Sabina, Don?t know how you do javascript and JQuery in Seaside (I use Appex) but can?t you build something like this: http://stackoverflow.com/questions/5525071/how-to-wait-until-an-element-exists Maarten, > On 25 Jul 2016, at 11:52, Sabine Manaa wrote: > > I create pdf reports which are converted to pngs for small previews (and > print/mail/export). > > When the user clicks at "report", there are several pdf reports and their > pngs generated in the background. > In this moment (When the user clicks at "report"), the application changes > to the reports page. > But in this moment, the repots possibly are not yet finished :-) > > So, I want to show a spinner/counter for each of the reports and update > each in the moment when the png is ready. > > I succeeded with all but the spinner/counter and the moment when the page > renders. Its to late. > > My problem is that the page is rendered only in the moment, when the code is > run. Not earlier. > I assume the onLoad is to late? I tried several things for several hours :-( > and now I want to ask the community. > > I reduced the problem to a very simple example: 2 methods with the question: > how to change this code to update the counter 1,2,3,4... > Very curious about a solution > > >>> renderContentOn: html > html div > id: 'image'; > with: [ html text: 'Waiting for the report' ]. > html div > id: 'counter'; > with: [ html text: 'This should count 1,2,3...' ]. > html document addLoadScript: (html jQuery ajax script: [ :script | self > loadScriptIndex: 1 script: script ]) > >>> loadScriptIndex: anIndex script: s > | theIndex | > (Delay forMilliseconds: 100) wait. > theIndex := anIndex. > "aPngFilename asFileReference exists" anIndex > 50 "simulate file is there > after some time" > ifTrue: [ > s << (s jQuery: #image) > replaceWith: [ :h | > h text: theIndex asString. > h image > altText: 'Report'; > width: '100%'; > url: 'http://localhost/reports/a.png' ] ] > ifFalse: [ theIndex := theIndex + 1. > s << (s jQuery: #counter) > replaceWith: [ :h | > h div > id: #counter; > with: [ h text: theIndex asString ] ]. > self > loadScriptIndex: theIndex > script: s > > > and possibly > registerTestApplication > | theApplication | > theApplication := WAAdmin register: RKATestView asApplicationAt: 'RKT'. > theApplication > addLibrary: JQDeploymentLibrary; > addLibrary: JQUiDeploymentLibrary. > ^ theApplication > > > > > > -- > View this message in context: http://forum.world.st/show-spinner-until-something-is-done-tp4907725.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/20160725/6c616edd/attachment.htm From manaa.sabine at gmail.com Tue Jul 26 13:04:33 2016 From: manaa.sabine at gmail.com (Sabine Manaa) Date: Tue Jul 26 13:48:40 2016 Subject: [Seaside] Re: show spinner until something is done In-Reply-To: <1F306801-4489-485F-86FE-144247AA3778@wanadoo.fr> References: <1469440358216-4907725.post@n4.nabble.com> <1F306801-4489-485F-86FE-144247AA3778@wanadoo.fr> Message-ID: Hi Maarten, I am just experimenting with it and it seems to work in my small example. You brought my thoughts in a new direction - thanks a lot for it! I started with adding it as html script: '' and will change it to smalltalk code later. I replaced the check for a dom element in the example with the check if the file on the server exists. Regards Sabine 2016-07-25 22:12 GMT+02:00 Maarten Mostert-2 [via Smalltalk] < ml-node+s1294792n4907892h47@n4.nabble.com>: > Hello Sabina, > > Don?t know how you do javascript and JQuery in Seaside (I use Appex) but > can?t you build something like this: > > > http://stackoverflow.com/questions/5525071/how-to-wait-until-an-element-exists > > Maarten, > > > > On 25 Jul 2016, at 11:52, Sabine Manaa <[hidden email] > > wrote: > > I create pdf reports which are converted to pngs for small previews (and > print/mail/export). > > When the user clicks at "report", there are several pdf reports and their > pngs generated in the background. > In this moment (When the user clicks at "report"), the application changes > to the reports page. > But in this moment, the repots possibly are not yet finished :-) > > So, I want to show a spinner/counter for each of the reports and update > each in the moment when the png is ready. > > I succeeded with all but the spinner/counter and the moment when the page > renders. Its to late. > > My problem is that the page is rendered only in the moment, when the code > is > run. Not earlier. > I assume the onLoad is to late? I tried several things for several hours > :-( > and now I want to ask the community. > > I reduced the problem to a very simple example: 2 methods with the > question: > how to change this code to update the counter 1,2,3,4... > Very curious about a solution > > > renderContentOn: html > > html div > id: 'image'; > with: [ html text: 'Waiting for the report' ]. > html div > id: 'counter'; > with: [ html text: 'This should count 1,2,3...' ]. > html document addLoadScript: (html jQuery ajax script: [ :script | self > loadScriptIndex: 1 script: script ]) > > loadScriptIndex: anIndex script: s > > | theIndex | > (Delay forMilliseconds: 100) wait. > theIndex := anIndex. > "aPngFilename asFileReference exists" anIndex > 50 "simulate file is there > after some time" > ifTrue: [ > s << (s jQuery: #image) > replaceWith: [ :h | > h text: theIndex asString. > h image > altText: 'Report'; > width: '100%'; > url: 'http://localhost/reports/a.png' ] ] > ifFalse: [ theIndex := theIndex + 1. > s << (s jQuery: #counter) > replaceWith: [ :h | > h div > id: #counter; > with: [ h text: theIndex asString ] ]. > self > loadScriptIndex: theIndex > script: s > > > and possibly > registerTestApplication > | theApplication | > theApplication := WAAdmin register: RKATestView asApplicationAt: 'RKT'. > theApplication > addLibrary: JQDeploymentLibrary; > addLibrary: JQUiDeploymentLibrary. > ^ theApplication > > > > > > -- > View this message in context: > http://forum.world.st/show-spinner-until-something-is-done-tp4907725.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/show-spinner-until-something-is-done-tp4907725p4907892.html > To start a new topic under Seaside General, email > ml-node+s1294792n86180h75@n4.nabble.com > To unsubscribe from show spinner until something is done, click here > > . > NAML > > -- View this message in context: http://forum.world.st/show-spinner-until-something-is-done-tp4907725p4908028.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/20160726/bdfb0c47/attachment-0001.htm