Created
March 24, 2012 14:25
-
-
Save molekilla/2183479 to your computer and use it in GitHub Desktop.
Escuelita de Scala - Parte 3 - Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
import play.api._ | |
import play.api.mvc._ | |
import play.api.libs.json._ | |
import services.RegPubServices | |
object Application extends Controller { | |
def index = Action { | |
Ok(views.html.index("Hola Escuelita de Scala")) | |
} | |
def about = Action { | |
Ok(views.html.about()) | |
} | |
def search(searchText:String) = Action { | |
val searchResults = RegPubServices().searchDocuments(searchText) | |
Ok(searchResults) | |
} | |
def findByName(searchText:String) = Action { | |
val searchResults = RegPubServices().findByName(searchText) | |
Ok(searchResults) | |
} | |
def typeahead(searchText:String) = Action { | |
val searchResults = RegPubServices().searchTypeahead(searchText) | |
Ok(searchResults) | |
} | |
def show(ficha:String) = Action { | |
TODO | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment