Rigan
(Rigan Islam)
1
public class ProfitLossView extends ProfitLossDesign implements View{
private final ReportService reportService;
@Autowired
public ProfitLossView(ReportService reportService) {
this.reportService = reportService;
}
@Autowired
private ApplicationContext appContext;
@Override
public void enter(ViewChangeEvent event) {
}
@PostConstruct
public void init() {
JasperReportsPdfView view = new JasperReportsPdfView();
view.setUrl("classpath:/reports/user.jrxml");
view.setApplicationContext(appContext);
Map<String, Object> params = new HashMap<String, Object>();
params.put("datasource", reportService.report());
}