Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.0
-
Fix Version/s: EE-3.0.0.BETA, 3.0.1
-
Component/s: Framework
-
Labels:None
-
Environment:ICEfaces 3 portal
Description
During the work done for http://jira.icefaces.org/browse/ICE-7684, we implemented a fix to solve a problem with the ace:dateExporter component when running on a portlet. The original problem in that case was related to the following section of code:
public void restoreState(FacesContext context, Object state) {
//call method from super-class to restore the component attributes first
super.restoreState(context, state);
Map attributes = getAttributes();
String name = (String) attributes.get("name");
String library = (String) attributes.get("library");
String version = (String) attributes.get("version");
ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
--> Resource r = resourceHandler.createResource(name, fixResourceParameter(library));
String path = r.getRequestPath();
if (version == null) {
script = path;
} else {
if (path.contains("?")) {
script = path + "&v=" + version;
} else {
script = path + "?v=" + version;
}
}
}
There are 2 reasons for evaluating and potentially removing the createResource() call during restoreState().
1) It exposes an issue in the PortletFaces Bridge where the request wrapper we set is replaced by the original raw request and the request parameter values are lost (seeICE-7684 for more details).
2) It may be unnecessarily performance intensive.
public void restoreState(FacesContext context, Object state) {
//call method from super-class to restore the component attributes first
super.restoreState(context, state);
Map attributes = getAttributes();
String name = (String) attributes.get("name");
String library = (String) attributes.get("library");
String version = (String) attributes.get("version");
ResourceHandler resourceHandler = context.getApplication().getResourceHandler();
--> Resource r = resourceHandler.createResource(name, fixResourceParameter(library));
String path = r.getRequestPath();
if (version == null) {
script = path;
} else {
if (path.contains("?")) {
script = path + "&v=" + version;
} else {
script = path + "?v=" + version;
}
}
}
There are 2 reasons for evaluating and potentially removing the createResource() call during restoreState().
1) It exposes an issue in the PortletFaces Bridge where the request wrapper we set is replaced by the original raw request and the request parameter values are lost (see
2) It may be unnecessarily performance intensive.
Issue Links
- blocks
-
ICE-7713 Improve strategy for behaviour of ace:fileEntry component in portlets.
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P2 |
Ken Fyten
made changes -
Fix Version/s | EE-3.0.0.BETA [ 10324 ] | |
Fix Version/s | 3.0.1 [ 10282 ] | |
Fix Version/s | EE-3.0.0.GA [ 10262 ] |
Deryk Sinotte
made changes -
Mircea Toma
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | EE-3.0.0.GA [ 10262 ] | |
Fix Version/s | 3.1 [ 10312 ] |
Mircea Toma
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Estimated Complexity | Low | |
Salesforce Case | [] | |
Fix Version/s | 3.1 [ 10312 ] | |
Assignee Priority | P2 | |
Assignee | Mircea Toma [ mircea.toma ] |
Deryk Sinotte
created issue -