Hi All,
Newbie question here.
I am working through Chapter 21.6/21.6.1 of the Seaside book using both it and the Github version (Square Brackets Associates) as a cross reference for new material.
I am running into an issue where when adding the jQuery functionality as described in section 21.6.1, 'Adding an Effect,' I do not get the effect. For some reason the code that is supposed to add jQuery to a page:
renderHeadingOn: html
| helpId |
helpId := html nextId.
(html heading)
class: 'helplink';
onClick: ((html jQuery new id: helpId) ***** <<<------ HERE
slideToggle: 1 seconds);
with: self model title.
(html div)
id: helpId;
class: 'help';
style: 'display: none';
with: 'The ToDo app enhanced with jQuery.'
Does not result in the rendered page getting the <link script element added to the head section nor in the <script> tag before the closing body tag (all according to firefox's developer tools as per:
[image.png]
Any help would be greatly appreciated.
Kind Regards,
Ian
Sent with [ProtonMail](https://protonmail.com/) Secure Email.
Hi,
I followed the instructions here: https://github.com/astares/Seaside-Bootstrap, to a T and proceeded to create a class:
WAComponent subclass: #MyBootstrapExample
instanceVariableNames: ''
classVariableNames: ''
package: 'iExamples'
From there I added two methods:
renderContentOn: html
html heading level2 with: 'Examples'.
html alert bePrimary with: 'A simple primary alert—check it out!'.
html break.
rendererClass
^ SBSHtmlCanvas
From here I registered the app and I get a page rendered.
Problem:
There is no bootstrap? (The head section of the rendered page has no links to any css or js other than the standard development.css.
Note:
All the default bootstrap examples work and all there rendered pages have the head section links that I would expect.
Question:
1. Why are not may pages including the links to the boostrap/jquery libraries?
2. How do I correct this (having the same issue with jquery (classes are loaded as they are embedded but not head section references?)?
Thanks in advance,
Ian
Sent with [ProtonMail](https://protonmail.com/) Secure Email.
Greetings all,
We have an early preview of our Seaside v3.4.4 port to VAST 10.0.2. Such a
new port will be officially released in VAST 2022 (11.0.0) but we wanted to
give you a chance to try it and provide feedback before then.
Download this .zip <https://bit.ly/3iwa1TJ> using your Instantiations
trial/licensed credentials. It contains a .dat with the new version of the
Seaside configuration maps:
z.ST: Server Smalltalk (SST) - Seaside v3.4.4 f
z.ST: Server Smalltalk (SST) - Seaside Testing v3.4.4 j
zz.Server.AbtSstSeasideFeature v3.4.4 c
You should import all versions of all configuration maps and then load what
you need. You can also script the import like this:
StsConfigurationMapsBrowser new importAllConfigMapsFrom:
'C:\your\path\to\Seaside3.4.4.dat'
And the load like this:
(EmConfigurationMap editionsFor: 'z.ST: Server Smalltalk (SST) - Seaside
Testing' ) first loadWithRequiredMaps
Finally, you can start a Seaside server either from "Transcript" -> "Tools"
-> "Open Seaside Control Panel" , or from code:
(WASstServerAdaptor port: 8080)
codec: (GRCodec forEncoding: 'utf-8');
start
And of course, then from the browser navigate to http://localhost:8080/
Please, all testing and feedback is more than welcome.
Best,
--
Mariano Martinez Peck
Email: marianopeck(a)gmail.com
Twitter: @MartinezPeck
LinkedIn: www.linkedin.com/in/mariano-martinez-peck
<https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/>
Blog: https://marianopeck.wordpress.com/
I have had long discussions on Diascord but to no avail. Perhaps a new statement of the problem might help.
I have a Pharo 9.0, MacOs M1 VM install where I run a Seaside app for my local scale plastic model club. The club as only about 16 members so the traffic is extremely light with most days the only such being search bots.
The pages are mostly designed to display photos of member’s models. The images are held on the server path. The data that makes up the pages is held in my own (what I call) TinyKV (Key Value database). This database uses the Pharo Filesystem to save and retrieve JSON text files.
The Pharo image doesn’t run for more than about 10 hours when it just disappears leaving no crash log or debug files. I have checked the database software and all files are opened and closed correctly so there are no hanging file handles (unless the underlying code doesn’t clean up but that’s a guess).
The Pharo image is running on a brand new 8GB M1 MacMini and is the only code running on that machine.
To test out my code, I recently ran what could be seen as a “Denial of Service” attack on my own web site. The following is the code that I ran on my M1 MacBookAir under Pharo 9/M1 VM.
| response content headers contentList|
Transcript show: Time now printString; cr.
contentList := OrderedCollection new.
1 to: 2000 do: [ : i |
response := ZnClient new
url: 'http://www.ipms-clacton.org.uk:8080/CNWHome';
get;
response.
response := ZnClient new
url: 'http://www.ipms-clacton.org.uk:8080/CNWShowOneImage?ab?022020001.jpg';
get;
response.
contentList add: response contents.
].
Transcript show: Time now printString; cr.
^ contentList
This hit the website with 2000 non-stop requests for the home page and for one of the pages that gets its data from the database (where “022020001.jpg” is a JSON file whose content is
"{"dateOfRecord" : ""owner" : "ab","text" : "1-72 Scale Airfix Lancaster BIII converted to Aries of EANS - Airfix (first mould) with M&E Lancastrian Conversion","imagePath" : "022020001.jpg”}”
I have also tried this code with 250 millisecond wait.
The server accepts all of these requests and even responds to other requests whilst this is happening so I can see nothing wrong with my code, be it the Seaside or the database.
I have run this code on a variety of machines under 8.0 and 9.0. I have run it under VAST on Windows 10 and Windows 2012 Server in addition to on the Mac. I have the same problem under 8.0 as 9.0 no matter which VM I use.
What do I do next?