appendParameter(baseURL, Constants.PORTLET_MODE_PARAMETER, mode.toString());
}
}
else
{
RenderURL renderURL = (RenderURL)containerURL;
WindowState windowState = renderURL.getWindowState();
if (windowState != null)//&& !windowState.equals(WindowState.NORMAL))
{
appendParameter(baseURL, Constants.WINDOW_STATE_PARAMETER, windowState.toString());
}
Mode mode = renderURL.getMode();
if (mode != null && !mode.equals(Mode.VIEW))
{
appendParameter(baseURL, Constants.PORTLET_MODE_PARAMETER, mode.toString());
}
Map<String, String[]> publicNSChanges = renderURL.getPublicNavigationalStateChanges();
if (ParameterValidation.existsAndIsNotEmpty(publicNSChanges))
{
for (String key : publicNSChanges.keySet())
{
String[] values = publicNSChanges.get(key);
if (values != null && values.length > 0)
{
for (String value : values)
{
appendParameter(baseURL, key, value);
}
}
else
{
appendParameter(baseURL, "removePP", key);
}
}
}
StateString state = renderURL.getNavigationalState();
if (state != null && !state.getStringValue().equals(StateString.JBPNS_PREFIX))
{
appendParameter(baseURL, NAVIGATIONAL_STATE_PARAM_NAME, state.getStringValue());
}
}