Jasig/WeatherPortlet — pull request #4 by waymirec (2012-11-15 23:46:34+00:00)
Title: WPT-53

Modify applicationContext.xml to make the YahooWeatherDaoImpl the default implementation for the weather service so as to match the overlay. Add a messageSource property reference to the bean and set the default "key" property to an empty string with a comment indicating the need to change it.

Augment the YahooWeatherDaoImpl.find() method to validate the existence of the API key. If one is not found throw a runtime exception with an appropriate message.

Modify the FindCityController.findCity() method to catch the potential exception thrown by YahooWeatherDaoImpl.find() and inject an appropriate string into the model under the key of "error".

Add a hidden div to the edit view for displaying any errors returned from the search ajax call.

Add the necessary logic to weather.js to handle the returned error value and display it properly.