Here's a quick demonstration of a simple Web Velocity Application, using one of the "out of the box" themes, a few UI customizations for display, and some ajaxified database searches. If you look carefully, you'll see that there are no full page submits at all. To watch, click on the viewer below:
If you have trouble viewing that directly, you can click here to download the video directly
Here's the code that renders the javascript enabled widgets; it's using the Gadgets package:
renderActionsOn: html
self renderBasicSearchOn: html.
html space.
self renderCheckBoxesOn: html
renderBasicSearchOn: html
html text: 'Search: '.
html space.
html input changeCallback: [:renderer :newValue | searchVal := newValue].
html space.
html button
onClick: (html refresh: [:renderer | self setupSearchQuery. self renderDetailsOn: renderer]);
onClick: 'return false';
with: 'Search'.
html space.
html button
onClick: (html refresh: [:renderer | self resetDefaultQuery. self renderDetailsOn: renderer]);
onClick: 'return false';
with: 'All'.
renderCheckBoxesOn: html
| group |
html text: 'Search for Video Only: '.
html space.
html input beCheckbox
changeCallback: [:renderer :newValue | searchByVideo := newValue. ].
html space.
html text: 'Search for Audio Only: '.
html input beCheckbox
changeCallback: [:renderer :newValue | searchByAudio := newValue]
The code behind the button sets up the database query, and then re-renders the lower display area based on the search results.
You can also watch it on Vimeo:
A Simple Web Velocity Application from James Robertson on Vimeo.
Or on YouTube:
Technorati Tags:
smalltalk, seaside, web velocity