Search code examples
jsf-2jsf-2.2oracle-adfadf-task-flow

Redirect to another view on the same taskflow programatically on ADF


I have one taskflow and have two views like this image:

Example of two views

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.

How to call it, because I am using JSFF as a page?

If I use this method:

       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();
   }

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.

Do you have another method to solve this, or can you fix it if I get wrong find component?


Solution

  • You have use "URL view" and redirect it to your path :enter image description here