title: Redirect to another view on the same taskflow programatically on ADF
body: <p>I have one taskflow and have two views like this image:</p>
  
  <p><a href="https://i.stack.imgur.com/VK2zg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VK2zg.jpg" alt="Example of two views"></a></p>
  
  <p>I have a button to go there, but I don't need to click the button. I need to redirect programmatically to another view with calling the action.</p>
  
  <p>How to call it, because I am using JSFF as a page? </p>
  
  <p>If I use this method:</p>
  
  <pre><code>       FacesContext fctx = FacesContext.getCurrentInstance();
     UIViewRoot root = fctx.getViewRoot();
     //client Id of button includes naming container like id of region. 
     RichCommandButton button = 
         (RichCommandButton) root.findComponent("cb1");
     ActionEvent actionEvent = new ActionEvent(button);
     actionEvent.queue();
     }
  </code></pre>
  
  <p>I get an error like can't find the component. If I use page template id I also get an error like the compiler can't find the component.</p>
  
  <p>Do you have another method to solve this, or can you fix it if I get wrong find component?</p>