Hello, the scenario is this: User opens View A and enters URL manually to go to View B. In this case I want to redirect the user to another View, because of security settings. So in my View B, in the enter( ViewChangeEvent event ) method, I wrote this:
Navigator nav = new Navigator(myUIObject, ViewC);
nav.addView("/ViewC",ViewC);
nav.navigateTo("/ViewC");
In this case an error is shown:
java.lang.IllegalArgumentException: Trying to navigate to an unknown state...
Can anyone help please?
I have a MyUI class that extends UI and I am trying to navigate within my View class, which does not extend UI. I cannot call it that way. Within my MyUI class the navigator is fine, but how to deal within the ViewClass.
These are separated classes. In my MyUI class I have a container, but this container is not defined in the other classes. Maybe I am not expressing very well, can you please tell me a way to perform navigation from ViewA to ViewB (not classes that extend UI) ?