Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.2
-
Component/s: Framework, ICE-Components
-
Labels:None
-
Environment:ICEfaces 2 MyFaces 2
Description
In trying to get MyFaces running with ICEfaces 2 (ICE-5868) I found that a couple of components are not operating properly due to the timing of state saving. The two currently known components with issues are:
OutputChart: after the chart is initially rendered, clicking on the image map points generates an NPE
Caused by: java.lang.NullPointerException
at com.icesoft.faces.component.outputchart.OutputChart.getGeneratedImageMapArea(OutputChart.java:414)
at com.icesoft.faces.component.outputchart.OutputChart.decode(OutputChart.java:359)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1204)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIForm.processDecodes(UIForm.java:114)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIViewRoot._processDecodesDefault(UIViewRoot.java:1320)
...
Progress Bar: the progress bar is not updated even though Push is operating properly.
OutputChart: after the chart is initially rendered, clicking on the image map points generates an NPE
Caused by: java.lang.NullPointerException
at com.icesoft.faces.component.outputchart.OutputChart.getGeneratedImageMapArea(OutputChart.java:414)
at com.icesoft.faces.component.outputchart.OutputChart.decode(OutputChart.java:359)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1204)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIForm.processDecodes(UIForm.java:114)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1198)
at javax.faces.component.UIViewRoot._processDecodesDefault(UIViewRoot.java:1320)
...
Progress Bar: the progress bar is not updated even though Push is operating properly.
Issue Links
Activity
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Deryk Sinotte
made changes -
Deryk Sinotte
made changes -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #25326 | Wed Aug 24 15:05:06 MDT 2011 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/context/CompatDOMPartialViewContext.java
MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/util/EnvUtils.java |
Deryk Sinotte
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 2.1-Beta2 [ 10294 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Both of the component issues are related to the strategy and timing of state saving in MyFaces.
With Mojarra, a marker/placeholder is used and state saving is not done until getViewState() is actually called. In Mojarra, this is done when the response is being written and the marker is being replaced.
With MyFaces, a marker is not used and getViewState() is called during the normal render process to inject the ViewState into the page. However, state saving is also done at this time but only once (as an optimization). Because of this, elements on the page that have not finished setting various state related values will not have those values saved and restored properly. For example, note the order of events as they are logged when the progress bar is updating:
OutputProgress.saveState: null
OutputProgressModel.setPercentComplete: 50
OutputProgress.restoreState: null
OutputProgressModel.getPercentComplete: 0
OutputProgressRenderer.setPercentage: 0
The issue is similar for the Chart component as the actual Chart resource is not state saved and is therefore not available to be restored when the user clicks on the image map.