[ http://issues.apache.org/jira/browse/TOMAHAWK-793?page=all ]
Cagatay Civici updated TOMAHAWK-793:
------------------------------------
Status: Resolved (was: Patch Available)
Fix Version/s: 1.1.4-SNAPSHOT
1.1.5-SNAPSHOT
Resolution: Later
Assignee: Cagatay Civici
When the state saving is at client, AjaxDecodePhaseListener is not called
because each time an ajax request occurs the view is recreated and lifecycle
jumps to the render response phase. This is because of the latest dojo upgrade.
We'll fix this issue with the proper dojo version and an updated facesIO. When
the state saving is at server, inputsuggestajax works fine for now, see the
examples.
> inputSuggestAjax doesn't work due to phase listener issue.
> ----------------------------------------------------------
>
> Key: TOMAHAWK-793
> URL: http://issues.apache.org/jira/browse/TOMAHAWK-793
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: AJAX Form Components
> Affects Versions: 1.1.4-SNAPSHOT, 1.1.5-SNAPSHOT
> Reporter: David Green
> Assigned To: Cagatay Civici
> Fix For: 1.1.4-SNAPSHOT, 1.1.5-SNAPSHOT
>
> Attachments: patch.txt
>
>
> inputSuggestAjax doesn't work since the phase listener never gets called.
> The APPLY_REQUEST_VALUES phase is not entered in some circumstances,
> specifically if the RENDER_RESPONSE view completes early as it does when the
> view root is null in the following LifecycleImpl code snippet:
> //boolean viewCreated = false;
> UIViewRoot viewRoot = viewHandler.restoreView(facesContext,
> viewId);
> if (viewRoot == null)
> {
> viewRoot = viewHandler.createView(facesContext, viewId);
> viewRoot.setViewId(viewId);
> facesContext.renderResponse();
> //viewCreated = true;
> }
> If the null view root case is entered, the lifecycle is short-circuited and
> the APPLY_REQUEST_VALUES phase is never entered, causing the ajax control to
> have no suggested values.
> I was able to get the application to work as expected by subclassing the
> default AjaxDecodePhaseListener as follows:
> /**
> * Override the default ajax support, since it doesn't seem to work in the
> * APPLY_REQUEST_VALUES phase, since that phase never gets entered. Process
> immediately
> * after the RESTORE_VIEW phase instead.
> */
> public class AjaxDecodePhaseListener
> extends org.apache.myfaces.custom.ajax.api.AjaxDecodePhaseListener
> {
> private static final long serialVersionUID = 1660766611978163100L;
> public PhaseId getPhaseId()
> {
> return PhaseId.RESTORE_VIEW;
> }
> public void afterPhase(PhaseEvent event) {
> super.beforePhase(event);
> }
> public void beforePhase(PhaseEvent event) {
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira