Hi guys,
i have a complex view that has a 3 views/editors and a grid in it.
On entering the view, user will view the grid. I also notice the views/editors are also loaded when user enter by spring. Is there any methods to load the editors when needed?
i have tried the following but it does not work, there are still many call to the service to get the fields required.
@Route(value = AppConstants.PAGE_QUOTE, layout = MainAppLayout.class)
@CssImport(value = "./styles/components/combo-box-quote.css", themeFor = "vaadin-combo-box")
@CssImport(value = "./styles/components/form-item-quote.css", themeFor = "vaadin-form-item")
@CssImport(value = "./styles/quote-overlay-styles.css", themeFor = "vaadin-dialog-overlay")
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@SpringComponent
@VaadinSessionScope
public class QuoteView {
protected QuoteTemplateView quoteTemplateView;
private Dialog dialog;
protected QuoteReportDialog quoteReportDialog;
@Getter
private final PagingGridR<ResultQuery> pagingGridR;
@Getter
private final ResultQueryToolbar<Quote, QuoteService> crudToolbar;
private ResultQueryDialog crudDialog;
@Setter
protected QuoteEditor editor;
public QuoteView(QuotePresenter presenter, QuoteService quoteService) {
super(presenter, quoteService);
}
@Autowired(required = false)
public void setEditor(QuoteEditor editor) {
System.out.println("Init Editor");
super.setEditor(editor);
}
@Autowired(required = false)
public void setQuoteReportDialog(QuoteReportDialog quoteReportDialog) {
this.quoteReportDialog = quoteReportDialog;
}
@Autowired(required = false)
public void setQuoteTemplateView(QuoteTemplateView quoteTemplateView) {
this.quoteTemplateView = quoteTemplateView;
}
@Autowired(required = false)
public void setCrudDialog(ResultQueryDialog crudDialog) {
System.out.println("ResultQueryDialog");
this.crudDialog = crudDialog;
}
}