I have a problem in controlling the PortletMode back to
View after changing the preferences; on a Save or Back button;
Note: navigation works but if you return to /web/guest/home you'll see the EDIT page
I tried several things;
#1 Override com.sun.faces.portlet.FacesPortlet's processAction;
public void processAction(ActionRequest request, ActionResponse response) throws IOException, PortletException {
PortletMode portletmode = request.getPortletMode();
if (PortletMode.EDIT.equals(portletmode)) {
response.setPortletMode(PortletMode.VIEW);
} else if (PortletMode.HELP.equals(portletmode)) {
response.setPortletMode(PortletMode.VIEW);
}
super.processAction(request, response);
}
To some extend this works but only if you 'Save' to the same page eg return on action = "" and then press Back.
public String doSaveEditPage() {return "";}
public String doBackEditPage() {return "toview";}
#2 set ActionResponse from FacesContext
protected void setPortletModeToView() {
ActionResponse action_response = (ActionResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
action_response.setPortletMode(PortletMode.VIEW);
}
Even example portlets like guessnumber show same problems;
Anyone please it's driving me crazy!

using
jsf-api_1.1.jar (1.1_02-b08) Sun
jsf-impl_1.1.jar (1.1_02-b08) Sun
jsf-portlet_1.1.jar (1.1.6) Sun
Please sign in to flag this as inappropriate.