The following code shows the preferred approach for checking for the
submitIdentifiers
action.
The adapter performs this check two ways, depending on whether the current request is
from the API endpoint. The TemplateRenderAdapter
uses a slightly
different but equivalent method.
/**
* Determine if the user chose "Submit".
*/
private boolean isSubmitAttributesRequest(HttpServletRequest req)
{
if (apiSupport.isApiRequest(req))
{
return ActionSpec.SUBMIT_USER_ATTRIBUTES.isRequested(req);
}
return StringUtils.isNotBlank(req.getParameter("pf.submit"));
}