// the viewId into
// the response
// (interaction
// state)
RenderResponse renderResponse = (RenderResponse) getResponse();
PortletURL actionURL = renderResponse.createActionURL();
// Add parameters so they don't get lost
Enumeration<String> list = queryStr.getParameterNames();
while (list.hasMoreElements())
{
String param = list.nextElement().toString();
if (param.equals(Bridge.PORTLET_MODE_PARAMETER))
{
try
{
actionURL.setPortletMode(new PortletMode(queryStr.getParameter(param)));
}
catch (Exception e)
{
; // do nothing -- just ignore
}
}
else if (param.equals(Bridge.PORTLET_WINDOWSTATE_PARAMETER))
{
try
{
actionURL.setWindowState(new WindowState(queryStr.getParameter(param)));
}
catch (Exception e)
{
; // do nothing -- just ignore
}
}
else if (param.equals(Bridge.PORTLET_SECURE_PARAMETER))
{
try
{
actionURL.setSecure(Boolean.getBoolean(queryStr.getParameter(param)));
}
catch (Exception e)
{
; // do nothing -- just ignore
}
}
else
{
actionURL.setParameter(param, queryStr.getParameter(param));
}
}
// TODO hack to workaround double encoding problem
url = actionURL.toString();
url = url.replaceAll("\\&\\;", "&");
}
else
{ // action - write the viewId to navigational state
ActionResponse actionResponse = (ActionResponse) getResponse();