>From: Torsten Krah <[EMAIL PROTECTED]> 
>Hm did many Debug Points.
>
>My RequestParameterMap got the entered values.
>They are applied to my components in Phase 2 - setLocalValueSet is
>called with set = true.
>
>Now Phase 3 fails and Lifecycle goes to Phase 6.
>Now a fresh tree is rendered , because my components does not got a
>local value set - although the RestoreViewExecutor:
>
>
>Application application = facesContext.getApplication();
>ViewHandler viewHandler = application.getViewHandler();
>
>// boolean viewCreated = false;
>UIViewRoot viewRoot = viewHandler.restoreView(facesContext, 
>viewId);
>if (viewRoot == null) {
>viewRoot = viewHandler.createView(facesContext, viewId);
>viewRoot.setViewId(viewId);
>facesContext.renderResponse();
>// viewCreated = true;
> }
>
>does call the restoreView and the viewRoot is not null.
>If the view gets restored, why are the components "empty"?
>

I was speculating that the spring dialog flow was loosing track
of the current dialog.  The values in the flowScope were lost
because the dialog flow was somehow disconnected.  

That's why I suggested that you debug the spring FlowPhaseListener.
This guy adds a component to the view root.  At first, I thought that 
a Clay full view might be removing the FlowExecutionKeyStateHolder
component since there was not any Clay config on that component but
after further review, I don't think that's the issue.  Clay should only remove
components from the tree in the render phase if they are nested under a 
Clay component (AssignChildrenCommand).  

This FlowExecutionKeyStateHolder component is added as a child to 
the view root by the FlowPhaseListener.  It's not added as a child 
under a composing Clay component so I don't think that's the problem.

However, stepping through the FlowPhaseListener should point to the
problem.


>I am a little bit confused now, i've missed something, but dont know
>where to look now.
>
>The PhaseListener is doing the flow story and seems to work correct - i
>hope i did not missunderstand things.
>
>Any hints?
>

I'm not familiar with the spring web flow.  I'm only making guesses based
on a quick look through the javadoc.  If you create an example,
and attach it to a JIRA ticket, I'll try to make time to take a look.




Torsten
--- Begin Message ---
Hm did many Debug Points.

My RequestParameterMap got the entered values.
They are applied to my components in Phase 2 - setLocalValueSet is
called with set = true.

Now Phase 3 fails and Lifecycle goes to Phase 6.
Now a fresh tree is rendered , because my components does not got a
local value set - although the RestoreViewExecutor:


                Application application = facesContext.getApplication();
                ViewHandler viewHandler = application.getViewHandler();

                // boolean viewCreated = false;
                UIViewRoot viewRoot = viewHandler.restoreView(facesContext, 
viewId);
                if (viewRoot == null) {
                        viewRoot = viewHandler.createView(facesContext, viewId);
                        viewRoot.setViewId(viewId);
                        facesContext.renderResponse();
                        // viewCreated = true;
                }

does call the restoreView and the viewRoot is not null.
If the view gets restored, why are the components "empty"?

I am a little bit confused now, i've missed something, but dont know
where to look now.

The PhaseListener is doing the flow story and seems to work correct - i
hope i did not missunderstand things.

Any hints?

Torsten


Am Donnerstag, den 26.04.2007, 15:51 +0000 schrieb Gary VanMatre:
> >Got a problem with clay and flowScoped Spring beans.
> >
> >My view is everytime filled with the model values. The submitted values
> >are lost.
> >
> >I can enter some data in my input fields and submit the form - if i left
> >some required input fields empty, a message appears that something is
> >missing, so far so good.
> >However, the same field which i left empty - and all others i may have
> >changed - are now populated again with values from my bean.
> >
> >What might cause this? I thought the component should remember this
> >value and display this instead of the beans model value. Lifecycle
> >stopped processing at Validation phase, so the components should not be
> >cleared, any idea or tipps to debug this?
> >
> I took a look at the webflow javadoc [1].  It looks like they are using a 
> couple tricks for saving the FlowExecution.  The FlowPhase listener [2] adds 
> a non-visual component to the view root to keep state.  It also adds the flow 
> execution key to the view root.It looks like the flow key is used to restore 
> the FlowExecution.  I suspect the problem you are seeing has to do with the 
> state not being resorted for the current flow on the postback.  I would try 
> setting some break points in the FlowPhaseListener.         
> [1] 
> http://static.springframework.org/spring-webflow/docs/current/api/overview-summary.html
> [2] 
> http://opensource.atlassian.com/projects/spring/secure/attachment/12520/FlowExecutionKeyStateHolder.patch
> 
> >Torsten
> 
> 
> Gary

Attachment: smime.p7s
Description: S/MIME cryptographic signature


--- End Message ---

Reply via email to