The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Smalltalk Daily 08/19/10: Customizing a WebVelocity Query

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
Smalltalk Daily 08/19/10: Customizing a WebVelocity Query Posted: Aug 19, 2010 7:16 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Smalltalk Daily 08/19/10: Customizing a WebVelocity Query
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

Today's Smalltalk Daily looks at how you can customize a query for one of the standard scaffolding UIs in WebVelocity. The code added is all in class NoteListUI. To jump to the video, Click here

First, add a variable, searchText


renderActionsOn: html
	super renderActionsOn: html.
	html text: 'Search'.
	html space.
	html textInput on: #searchText of: self.
	html button
		callback: [self applySearch];
		value: 'Search'.
	html button
		callback: [self returnToAll];
		value: 'All'

applySearch
	"do the search"
	
	| query newSearchText |
	query := Glorp.ActiveRecords.Query read: Note.
	newSearchText := '%', self searchText asLowercase, '%'.
	query where: [:each | each title asLowercase like: newSearchText].
	paginator query: query.

returnToAll
	| query |
	query := Glorp.ActiveRecords.Query read: Note.
	paginator query: query.

Click on the viewer below to watch it now:

If you have trouble viewing that directly, you can click here to download the video directly. If you need the video in a Windows Media format, then download that here.

You can also watch it on YouTube:

Technorati Tags: , , ,

Read: Smalltalk Daily 08/19/10: Customizing a WebVelocity Query

Topic: DSL copy-edited text in roughcut Previous Topic   Next Topic Topic: Agile Coaches Dojo Experiments

Sponsored Links



Google
  Web Artima.com   

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