state = actionURL.getNavigationalState();
if (state != null && !state.getStringValue().equals(StateString.JBPNS_PREFIX)) {
url.setQueryParameterValue(NAVIGATIONAL_STATE_PARAM_NAME, state.getStringValue());
}
WindowState windowState = actionURL.getWindowState();
if (windowState != null) {
url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
}
Mode mode = actionURL.getMode();
if (mode != null) {
url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());
}
} else if (containerURL instanceof ResourceURL) {
ResourceURL resourceURL = (ResourceURL) containerURL;
url.setQueryParameterValue(Constants.RESOURCE_ID_PARAMETER, resourceURL.getResourceId());
CacheLevel cachability = resourceURL.getCacheability();
if (cachability != null) {
url.setQueryParameterValue(Constants.CACHELEVEL_PARAMETER, cachability.name());
}
StateString resourceState = resourceURL.getResourceState();
if (resourceState != null && !resourceState.getStringValue().equals(StateString.JBPNS_PREFIX)) {
url.setQueryParameterValue(RESOURCE_STATE_PARAM_NAME, resourceState.getStringValue());
}
resourceState = resourceURL.getNavigationalState();
if (resourceState != null && !resourceState.getStringValue().equals(StateString.JBPNS_PREFIX)) {
url.setQueryParameterValue(NAVIGATIONAL_STATE_PARAM_NAME, resourceState.getStringValue());
}
WindowState windowState = resourceURL.getWindowState();
if (windowState != null) {
url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
}
Mode mode = resourceURL.getMode();
if (mode != null) {
url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());
}
} else {
RenderURL renderURL = (RenderURL) containerURL;
WindowState windowState = renderURL.getWindowState();
if (windowState != null)// && !windowState.equals(WindowState.NORMAL))
{
url.setQueryParameterValue(Constants.WINDOW_STATE_PARAMETER, windowState.toString());
}
Mode mode = renderURL.getMode();
if (mode != null) {
url.setQueryParameterValue(Constants.PORTLET_MODE_PARAMETER, mode.toString());