Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.0
-
Fix Version/s: 3.1.0.BETA1, 3.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:ICEfaces 3 portal portlet File Entry
-
Assignee Priority:P2
Description
For case http://jira.icefaces.org/browse/ICE-7684, we fixed the behaviour of the ace:fileEntry component by adjusting the FileEntryPhaseListener to set the wrapped request in two places of the PortletFaces Bridge code. However, we should revisit this change and look at the behaviour of BridgeSetup$NonTransientJavascriptResourceOutput:
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;
}
}
}
as well as the result in the bridge itself to see if we are doing the right thing.
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;
}
}
}
as well as the result in the bridge itself to see if we are doing the right thing.
As per
ICE-7684, it looks like Mircea has removed the call to createResource that was causing the issue so we should remove the original fix and retest.