Example: Display Multiple Error Messages

FormRequest formRequest = new FormRequest(loginEnv);
 
// Populate form request.
...condensed...
 
// Execute form request to add new employee to Employee Master using P060116Q.
String response = JDERestServiceProvider.jdeRestServiceCall(loginEnv, formRequest,
                                                             JDERestServiceProvider.POST_METHOD, 
                                                             JDERestServiceProvider.FORM_SERVICE_URI);
 
P060116Q_W060116QA_FormParent p060116FormParent = loginEnv.getObjectMapper().readValue(response, P060116Q_W060116QA_FormParent.class);
                
if (p060116FormParent != null)
{
    // If insert was successful, clear input fields.  Otherwise, display errors.
    FormErrorWarning[] errors = p060116FormParent.getFs_P060116Q_W060116QA().getErrors();
    List<E1Message> errorList = new ArrayList<E1Message>();
    if (errors.length > 0)
    {
        for (int i = 0; i < errors.length; i++)
        {
            errorList.add(new E1Message(E1Message.Severity.ERROR, errors[i].getMOBILE()));
        }
        
        E1AdfUtils.addErrorMessages(errorList);                 
	E1AdfUtils.launchMessagePopup();
    }
    else
    {
        clearInputFields();
    }
}

As mentioned previously, the EnterpriseOne ADF Container's message popup will only display when the EnterpriseOne ADF application is running inside the EnterpriseOne ADF Container. In order to display messages when the application is running on JDeveloper's Integrated Oracle WebLogic Server, you can conditionalize your error reporting code to use the Java Server Faces messaging feature, as shown in the below example: