String toViewId = navCase.getToViewId(context);
Map<String,List<String>> params = getParamOverrides(component);
addNavigationParams(context, navCase, params);
String result = null;
boolean didDisableClientWindowRendering = false;
ClientWindow cw = null;
try {
Map<String, Object> attrs = component.getAttributes();
Object val = attrs.get("disableClientWindow");
if (null != val) {
didDisableClientWindowRendering = "true".equalsIgnoreCase(val.toString());
}
if (didDisableClientWindowRendering) {
cw = context.getExternalContext().getClientWindow();
if (null != cw) {
cw.disableClientWindowRenderMode(context);
}
}
result = Util.getViewHandler(context).getBookmarkableURL(context,
toViewId,
params,
isIncludeViewParams(component, navCase));
} finally {
if (didDisableClientWindowRendering && null != cw) {
cw.enableClientWindowRenderMode(context);
}
}
return result;
}