Details
-
Type: Bug
-
Status: Closed
-
Priority: 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>
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>
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;\""