Example: Display Error Messages When Running Locally on JDeveloper's Integrated Oracle WebLogic Server

if (AISClientCapability.isCapabilityAvailable(loginEnv, AISClientCapability.GRID))
{
    // Code to perform Form Service Request and process response.
}
else
{
    String msg = "The grid capability is not supported on AIS Server";
    if (runningInJDEADFContainer)
    {
        E1AdfUtils.addErrorMessage(msg);
        E1AdfUtils.launchMessagePopup();
    }
    else
    {
        FacesContext.getCurrentInstance().addMessage("E1ADFApp", new FacesMessage(FacesMessage.SEVERITY_ERROR, "AIS Capability Not Supported ", msg));
    }
}

See Accessing EnterpriseOne Data from ADF Applications to review the code that first determines whether the EnterpriseOne ADF application is running locally or in the Enterpriseone ADF Container and then sets the runningInJDEADFContainer boolean accordingly.