Bound the input text to a model; implemented the page switching.