final String viewId = render.attributeValue("view-id");
Element messageElement = render.element("message");
String message = messageElement==null ? null : messageElement.getTextTrim();
String control = messageElement==null ? null : messageElement.attributeValue("for");
String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
Severity severity = severityName==null ?
FacesMessage.SEVERITY_INFO :
getFacesMessageValuesMap().get( severityName.toUpperCase() );
rule.addNavigationHandler( new RenderNavigationHandler(stringValueExpressionFor(viewId), message, severity, control) );
}
Element redirect = element.element("redirect");
if (redirect!=null)
{
List<Element> children = redirect.elements("param");
final List<Param> params = new ArrayList<Param>();
for (Element child: children)
{
params.add( parseParam(child, true) );
}
final String viewId = redirect.attributeValue("view-id");
final String url = redirect.attributeValue("url");
final String includePageParamsAttr = redirect.attributeValue("include-page-params");
final boolean includePageParams = includePageParamsAttr == null ? true : Boolean.getBoolean(includePageParamsAttr);
Element messageElement = redirect.element("message");
String control = messageElement==null ? null : messageElement.attributeValue("for");
String message = messageElement==null ? null : messageElement.getTextTrim();
String severityName = messageElement==null ? null : messageElement.attributeValue("severity");
Severity severity = severityName==null ?
FacesMessage.SEVERITY_INFO :
getFacesMessageValuesMap().get( severityName.toUpperCase() );
rule.addNavigationHandler(new RedirectNavigationHandler(stringValueExpressionFor(viewId),
stringValueExpressionFor(url), params, message, severity, control, includePageParams) );
}