programmatically navigate to particulart taskflow in ADF | Techartifact

Requirement-How to programmatically navigate to particulart taskflow in ADF.

Solution-

Following code show the sample code for navigating to particular taskflow using code.You can write it down in some managed bean

        TabContext tabContext = TabContext.getCurrentInstance();
        tabContext.setMainContent("/WEB-INF/flows/Global-Search.xml#Global-Search");// Global-Search is name of taskflow.

Import statement

import oracle.ui.pattern.dynamicShell.TabContext;
import oracle.ui.pattern.dynamicShell.TabContext.TabContentAreaDirtyException;

happy coding with techartifact ..This is end of 2012. Overall a great year. Lot of changes in Techartifact.

Note: this is only valid when you using Dynamic UI shell template.
Wishing you all a very prosperous Happy new Year enjoy …. 🙂

Programmatic Navigation in JSF/ADF | Techartifact

Requirement-How to programmatically navigate to next jsf page in taskflow.

Solution-

Following code show the sample code for navigating one jsf to another using code.

FacesContext context = FacesContext.getCurrentInstance();
context.getApplication().getNavigationHandler().handleNavigation(context,null,"controlflowcase");

Package: javax.faces.application.NavigationHandler

public abstract void handleNavigation(FacesContext context, String fromAction, String outcome)

Perform navigation processing based on the state information in the specified FacesContext,plus the outcome string returned by an executed application action.
Parameters:
context – The FacesContext for the current request.
fromAction – The action binding expression that was evaluated to retrieve the specified outcome,or null if the outcome was acquired by some other means.
outcome – The logical outcome returned by a previous invoked application action (which may be null)

happy coding with techartifact . 🙂

Programmatically showing the Popup in ADF | Techartifact

Requirment – To display popup in adf programmatic.

You have to display the popup on click of some button. Drag drop the af:popup in the page and bind the popup in the managed bean like screenshot

On the button , write a method on the action event.

   public void ShowPopup(ActionEvent actionEvent) {
             RichPopup.PopupHints hints = new RichPopup.PopupHints();
             this.getPopUp().show(hints);

    }

If you want to hide the popup..you can write like this

  public void HidePopup(ActionEvent actionEvent) {
             RichPopup.PopupHints hints = new RichPopup.PopupHints();
             this.getPopUp().hide();

    }