Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Operating System: Windows XP
Platform: PC
Description
noted in the forum: http://www.icefaces.org/JForum/posts/list/3066.page
user contrib:
I just got charts to work with a couple of changes to
com.icesoft.faces.component.outputchart.OutputChart
Code:
public String getPath() {
String folder = "/";
if (getFacesContext() != null
&& getFacesContext().getExternalContext() != null) {
if (DOMResponseWriter.isStreamWriting()) {
folder = "./web/chart/images";
} else {
Object ctx = getFacesContext().getExternalContext()
.getContext();
if (ctx instanceof ServletContext) {
folder = ((ServletContext) ctx).getRealPath("charts");
} else {
folder = ((PortletContext) ctx).getRealPath("charts");
}
}
}
return folder;
}
Code:
private String getChartFileName() {
Object req = FacesContext.getCurrentInstance().getExternalContext()
.getRequest();
String sessionId = "";
if (req instanceof HttpServletRequest) {
sessionId = ((HttpServletRequest) req).getRequestedSessionId();
} else {
sessionId = ((RenderRequest) req).getRequestedSessionId();
}
return this.getType()
+ this.getClientId(FacesContext.getCurrentInstance())
.replaceAll(":", "") + sessionId + imageCounter++
+ ".jpeg";
}
user contrib:
I just got charts to work with a couple of changes to
com.icesoft.faces.component.outputchart.OutputChart
Code:
public String getPath() {
String folder = "/";
if (getFacesContext() != null
&& getFacesContext().getExternalContext() != null) {
if (DOMResponseWriter.isStreamWriting()) {
folder = "./web/chart/images";
} else {
Object ctx = getFacesContext().getExternalContext()
.getContext();
if (ctx instanceof ServletContext) {
folder = ((ServletContext) ctx).getRealPath("charts");
} else {
folder = ((PortletContext) ctx).getRealPath("charts");
}
}
}
return folder;
}
Code:
private String getChartFileName() {
Object req = FacesContext.getCurrentInstance().getExternalContext()
.getRequest();
String sessionId = "";
if (req instanceof HttpServletRequest) {
sessionId = ((HttpServletRequest) req).getRequestedSessionId();
} else {
sessionId = ((RenderRequest) req).getRequestedSessionId();
}
return this.getType()
+ this.getClientId(FacesContext.getCurrentInstance())
.replaceAll(":", "") + sessionId + imageCounter++
+ ".jpeg";
}
Issue Links
- blocks
-
ICE-1809 Support for Liferay Portal
- Closed
With our latest refactoring from ICEfaces 1.5 to 1.6 and our latest Portlet efforts (http://jira.icefaces.org/browse/ICE-1478), inputChart seems to work as expected when used inside an ICEfaces Portlet.