ICEfaces
  1. ICEfaces
  2. ICE-1152

Portlets: Charts not working in portlets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.6DR#5, 1.6
    • 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";
        }

        Issue Links

          Activity

          There are no subversion log entries for this issue yet.

            People

            • Assignee:
              Unassigned
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: