The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Quick Web Velocity Example

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Quick Web Velocity Example Posted: Apr 19, 2009 8:32 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Quick Web Velocity Example
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

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: , ,

Read: Quick Web Velocity Example

Topic: Easy to Say... Previous Topic   Next Topic Topic: The Problem with Free

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use