Hello everyone.
I need to pass parameters from a menu item to a ListView without using URL query parameters.
I don’t want these parameters to be exposed in the URL, to prevent that a user can change them.
Looking at the help and the various examples I think the right solution is to use a menu beam.
But I encounter the following errors:
@Component("menuBean")
public class MenuBean {
@Autowired
private ViewNavigators viewNavigators;
public void handleMenuItem(Map<String, Object> parameters) {
viewNavigators.view(this, TestListView.class)
.withAfterNavigationHandler(afterViewNavigationEvent -> {
TestListViewview = afterViewNavigationEvent.getView();
view.setMessage("Hello World!");
})
.navigate();
}
}
The viewNavigators.view(this, TestListView.class) produce an error “Cannot resolve method”
Is it possible to have a complete and working example?
Thank you