A look at how you customize a query for one of the standard scaffolding UIs in WebVelocity.
A look at how you customize a query for one of the standard scaffolding UIs in WebVelocity. The code added is all in class NoteListUI:
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.
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.