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

          Hide
          Jack Van Ooststroom added a comment -

          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.

          Show
          Jack Van Ooststroom added a comment - 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.
          Hide
          Deryk Sinotte added a comment -

          Marking as FIXED.

          Our latest portlet demos that showed at JavaOne indicate that charts do work in portlets. Probably due to the refactoring of resource location logic, things should work much better now.

          Show
          Deryk Sinotte added a comment - Marking as FIXED. Our latest portlet demos that showed at JavaOne indicate that charts do work in portlets. Probably due to the refactoring of resource location logic, things should work much better now.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: