use of com.cassandrawebtrader.dto.WatchlistForm in project microservices by pwillhan.
the class WatchlistMapper method map.
public WatchlistForm map(Watchlist domain) {
WatchlistForm model = new WatchlistForm();
model.setWatchlistcode(domain.getWatchlistcode());
model.setSymbol(domain.getSymbol());
model.setActive(domain.getActive());
return model;
}
use of com.cassandrawebtrader.dto.WatchlistForm in project microservices by pwillhan.
the class WatchlistController method showWatchlistPage.
@RequestMapping(method = RequestMethod.GET)
public String showWatchlistPage(Model model) {
List<Watchlist> watchlists = (List<Watchlist>) watchlistRepository.findAll();
model.addAttribute("watchlists", watchlists);
WatchlistForm watchlistForm = new WatchlistForm();
model.addAttribute("watchlistForm", watchlistForm);
return "watchlist";
}
use of com.cassandrawebtrader.dto.WatchlistForm in project microservices by pwillhan.
the class WatchlistController method editWatchlistPage.
@RequestMapping(value = "/edit", method = RequestMethod.GET)
public ModelAndView editWatchlistPage(@RequestParam(value = "symbol", required = true) String symbol) {
ModelAndView modelAndView = new ModelAndView("watchlist-edit");
Watchlist watchlist = watchlistRepository.findBySymbol(symbol);
WatchlistForm watchlistForm = mapper.map(watchlist);
modelAndView.addObject(watchlistForm);
return modelAndView;
}
Aggregations