Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 1.7DR#2
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Platform independent
-
ICEsoft Forum Reference:
Description
The normal way to set a portlet window state in a JSF portlet would be like something this:
<ice:commandButton action="#{MyBean.submitButtonPressed}"/>
And in MyBean.java:
public String submitButtonPressed() {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Object response = externalContext.getResponse();
if (response instanceof javax.portlet.ActionResponse) {
ActionResponse actionResponse = (ActionResponse) response;
actionResponse.setWindowState(WindowState.MAXIMIZED);
}
else {
System.err.println("OH NO, THIS WAS NOT AN ActionResponse, INSTEAD, IT WAS: " + response.getClass().getName());
}
}
ICEfaces 1.7 currently doesn't support ActionRequests because every actionable request is handled through the Ajax communications and not through the portal container. Consequently, there is no way to programmatically change the mode through the ICEfaces/JSF API. To put it another way, there are currently no calls made through the processAction method of the portlet - it's currently unimplemented on purpose.
Somehow ICEfaces needs to support the ActionRequest mechanism, so that the ActionResponse can be used to set the WindowState.
<ice:commandButton action="#{MyBean.submitButtonPressed}"/>
And in MyBean.java:
public String submitButtonPressed() {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Object response = externalContext.getResponse();
if (response instanceof javax.portlet.ActionResponse) {
ActionResponse actionResponse = (ActionResponse) response;
actionResponse.setWindowState(WindowState.MAXIMIZED);
}
else {
System.err.println("OH NO, THIS WAS NOT AN ActionResponse, INSTEAD, IT WAS: " + response.getClass().getName());
}
}
ICEfaces 1.7 currently doesn't support ActionRequests because every actionable request is handled through the Ajax communications and not through the portal container. Consequently, there is no way to programmatically change the mode through the ICEfaces/JSF API. To put it another way, there are currently no calls made through the processAction method of the portlet - it's currently unimplemented on purpose.
Somehow ICEfaces needs to support the ActionRequest mechanism, so that the ActionResponse can be used to set the WindowState.
Issue Links
- depends on
-
ICE-2520 ICEfaces Ajax requests should generate ActionRequests in portal environments.
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Neil Griffin
created issue -
Deryk Sinotte
made changes -