ICEfaces
  1. ICEfaces
  2. ICE-4260

outputChart actionListener not executed when inside a panelGrid with another chart.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8DR#2, 1.8RC2
    • Fix Version/s: 1.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      All

      Description

      When there are two outputCharts in a panelGrid the actionListener methods for these charts is not called.

      Sample Code:

      <ice:panelGrid columns="2">
                          <ice:outputChart id="axisOutputChartOne"
                                           rendered="true"
                                           type="bar"
                                           chartTitle="Bar Chart One"
                                           yaxisTitle="Problems"
                                           xaxisTitle="Years"
                                           xaxisLabels="2000, 2001, 2002, 2003"
                                           labels="One, Two"
                                           colors="red, blue"
                                           data="10, 30, 40, 33: 30, 20, 30, 40"
                                           actionListener="#{testBean.chartActionOne}"/>
                          <ice:outputChart id="axisOutputChartTwo"
                                           rendered="true"
                                           type="bar"
                                           chartTitle="Bar Chart Two"
                                           yaxisTitle="Problems"
                                           xaxisTitle="Years"
                                           xaxisLabels="1999, 2099, 2199, 2299"
                                           labels="One, Two"
                                           colors="blue, yellow"
                                           data="15, 45, 66, 99: 13, 23, 20, 40"
                                           actionListener="#{testBean.chartActionTwo}"/>
                      </ice:panelGrid>

        Activity

        Hide
        Arran Mccullough added a comment -

        Possible Fix from customer:

        Problem here is that currently greater than 1 chart cannot be on one page because iceChartComponent is not correctly namespaced by clientId

        i.e:
        1) OutputChartRenderer should have
        hiddenField.setAttribute(HTML.NAME_ATTR, "iceChartComponent" + clientId);
        and OutputChart should have

        String chartComponentRequestIdentifier = (String) requestParameterMap
        .get(OutputChart.ICE_CHART_COMPONENT + getClientId(context));

        and
        onclick=\"document.forms['" +
        getParentFormId() + "']['" + ICE_CHART_COMPONENT + getClientId(context) +
        "'].value='" + getClientId(getFacesContext()) +
        "id-key" + areaMap.hashCode() +
        "';iceSubmitPartial(document.forms['" +
        getParentFormId() + "'],this,event); return false;\""

        Show
        Arran Mccullough added a comment - Possible Fix from customer: Problem here is that currently greater than 1 chart cannot be on one page because iceChartComponent is not correctly namespaced by clientId i.e: 1) OutputChartRenderer should have hiddenField.setAttribute(HTML.NAME_ATTR, "iceChartComponent" + clientId); and OutputChart should have String chartComponentRequestIdentifier = (String) requestParameterMap .get(OutputChart.ICE_CHART_COMPONENT + getClientId(context)); and onclick=\"document.forms['" + getParentFormId() + "']['" + ICE_CHART_COMPONENT + getClientId(context) + "'].value='" + getClientId(getFacesContext()) + "id-key" + areaMap.hashCode() + "';iceSubmitPartial(document.forms['" + getParentFormId() + "'],this,event); return false;\""
        Hide
        Adnan Durrani added a comment -

        The provided solution would work as well, but instead we have added a unique hidden field that will be used by all instances of the outputChart component.

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\outputchart\OutputChartRenderer.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\outputchart\OutputChartRenderer.java
        Completed: At revision: 18653

        Show
        Adnan Durrani added a comment - The provided solution would work as well, but instead we have added a unique hidden field that will be used by all instances of the outputChart component. Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\outputchart\OutputChartRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\outputchart\OutputChartRenderer.java Completed: At revision: 18653

          People

          • Assignee:
            Unassigned
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: