Submitted values lost - view is "refilled" everytime with model values

2007-04-26 Thread Torsten Krah
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?

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-26 Thread Mike Kienenberger

For JSF in general, this can be caused if you have input components in
multiple forms (recommended practice is one form per page), or inside
of UIData components (t:dataTable and t:dataList have a
preserveRowStates=true attribute to handle this).

On 4/26/07, Torsten Krah <[EMAIL PROTECTED]> wrote:

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?

Torsten




Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-26 Thread Torsten Krah
Don't have any of these.
Me uses one form and input components in this one form, without UIData.

Torsten 

Am Donnerstag, den 26.04.2007, 10:53 -0400 schrieb Mike Kienenberger:
> For JSF in general, this can be caused if you have input components in
> multiple forms (recommended practice is one form per page), or inside
> of UIData components (t:dataTable and t:dataList have a
> preserveRowStates=true attribute to handle this).
> 
> On 4/26/07, Torsten Krah <[EMAIL PROTECTED]> wrote:
> > 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?
> >
> > Torsten
> >
> >


smime.p7s
Description: S/MIME cryptographic signature


Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-26 Thread 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

Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-26 Thread Torsten Krah
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 + 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


smime.p7s
Description: S/MIME cryptographic signature


SV: Submitted values lost - view is "refilled" everytime with model values

2007-04-26 Thread Hermod Opstvedt
Hi

I think this is related to [1], since you are missing stuff from scope

[1] https://issues.apache.org/struts/browse/SHALE-410

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 26. april 2007 17:51
Til: user@shale.apache.org
Emne: Re: Submitted values lost - view is "refilled" everytime with model
values

>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-s
ummary.html
[2]
http://opensource.atlassian.com/projects/spring/secure/attachment/12520/Flow
ExecutionKeyStateHolder.patch

>Torsten


Gary



Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-27 Thread Gary VanMatre
>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 + 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

Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-29 Thread Torsten Krah
Now it gets interesting.
I tried to get it working, using scxml dialogs instead of SWF.

The same problem.

Lets take shale dialogs - i guess thats your scope, so you may have
better insights for me when using the dialogs, whats going wrong.

Torsten


Am Freitag, den 27.04.2007, 14:41 + schrieb Gary VanMatre:
> >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 t he 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
> 
> 
> E-Mail-Nachricht-Anlage
> >  Weitergeleitete Nachricht 
> > Von: Torsten Krah <[EMAIL PROTECTED]>
> > An: user@shale.apache.org
> > Betreff: Re: Submitted values lost - view is "refilled" everytime
> > with model values
> > Datum: Thu, 26 Apr 2007 17:38:42 +
> > 
> > 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 missund

Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-29 Thread Torsten Krah
Ok some more insight - it fails already with pure Clay - the View is not
taking part on SWF or SCXML dialogs (good to know, because SWF is
working than fine).

Lets take a look - i have a login form:

The one which works:




  
  




http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:clay="http://shale.apache.org/clay";
xmlns:s="http://shale.apache.org/core";
xmlns:t="http://myfaces.apache.org/tomahawk"; jsfid="void">



Login

Passwort

Passwort Confirm






loginLayout:














This works. I can enter some "wrong" values in the login form and submit
the page.
Changing the login name and provoking a fail at phase 3 results in that
changed login name redisplayed.

Now the one which does not work:




  
  




http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:clay="http://shale.apache.org/clay";
xmlns:s="http://shale.apache.org/core";
xmlns:t="http://myfaces.apache.org/tomahawk"; jsfid="void">



Login

Passwort

Passwort Confirm






Like you can see - its the same page like above.

The baseLayout2 is:















But now the form in page1Body.html does show things mentioned.
I can enter values for login and password. If i do all right, the values
are taken into the model and displayed.
But if i change the login name and dont insert a value for password, the
page gets redisplayed, of cause as its a required value.
But the login is the one from the bean, not the one i've entered the
last time.

The backing bean is a simple session pojo.

The form works sometimes, and sometimes it doesn't.

I'll try to get an example app online - but maybe someone is able to see
my failure, or the failure in clay, don't know if its me or not ^^

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-30 Thread Gary VanMatre

>Now it gets interesting.
>I tried to get it working, using scxml dialogs instead of SWF.
>
>The same problem.
>
>Lets take shale dialogs - i guess thats your scope, so you may have
>better insights for me when using the dialogs, whats going wrong.
>

What version of Clay are you using?  What version of Myfaces are you using?

It might be related to this issue: 
https://issues.apache.org/struts/browse/SHALE-418


>Torsten

Gary--- Begin Message ---
Now it gets interesting.
I tried to get it working, using scxml dialogs instead of SWF.

The same problem.

Lets take shale dialogs - i guess thats your scope, so you may have
better insights for me when using the dialogs, whats going wrong.

Torsten


Am Freitag, den 27.04.2007, 14:41 + schrieb Gary VanMatre:
> >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 t he 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
> 
> 
> E-Mail-Nachricht-Anlage
> >  Weitergeleitete Nachricht 
> > Von: Torsten Krah <[EMAIL PROTECTED]>
> > An: user@shale.apache.org
> > Betreff: Re: Submitted values lost - view is "refilled" everytime
> > with model values
> > Datum: Thu, 26 Apr 2007 17:38:42 +
> > 
> > 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.render

Re: Submitted values lost - view is "refilled" everytime with model values

2007-04-30 Thread Torsten Krah
Clay Trunk build on 20.4.07.
Myfaces 1.1.5

Torsten

Am Montag, den 30.04.2007, 15:07 + schrieb Gary VanMatre:
>  
> >Now it gets interesting.
> >I tried to get it working, using scxml dialogs instead of SWF.
> >
> >The same problem.
> >
> >Lets take shale dialogs - i guess thats your scope, so you may have
> >better insights for me when using the dialogs, whats going wrong.
> >
>  
> What version of Clay are you using?  What version of Myfaces are you
> using?
>  
> It might be related to this issue:
> https://issues.apache.org/struts/browse/SHALE-418
>  
> 
> >Torsten
>  
> Gary
> 
> E-Mail-Nachricht-Anlage
> >  Weitergeleitete Nachricht 
> > Von: Torsten Krah <[EMAIL PROTECTED]>
> > An: user@shale.apache.org
> > Betreff: Re: Submitted values lost - view is "refilled" everytime
> > with model values
> > Datum: Sun, 29 Apr 2007 10:38:41 +
> > 
> > Now it gets interesting.
> > I tried to get it working, using scxml dialogs instead of SWF.
> > 
> > The same problem.
> > 
> > Lets take shale dialogs - i guess thats your scope, so you may have
> > better insights for me when using the dialogs, whats going wrong.
> > 
> > Torsten
> > 
> > 
> > Am Freitag, den 27.04.2007, 14:41 + schrieb Gary VanMatre:
> > > >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 t he 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

Re: Submitted values lost - view is "refilled" everytime with model values

2007-05-01 Thread Torsten Krah
Got it - maybe.

This works:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:clay="http://shale.apache.org/clay";
xmlns:s="http://shale.apache.org/core";
xmlns:t="http://myfaces.apache.org/tomahawk";>






 Content




This works not:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";
xmlns:f="http://java.sun.com/jsf/core";
xmlns:h="http://java.sun.com/jsf/html";
xmlns:clay="http://shale.apache.org/clay";
xmlns:s="http://shale.apache.org/core";
xmlns:t="http://myfaces.apache.org/tomahawk";>







 Content





Removing the span for the "f:view" which assigns my locale (tested, i
can use a static value or a EL expression, both works assigning the
locale), but both breaks the formular.

Removing the span - magic my formular work, no values are lost.
Taking it back it breaks again.

Can anyone confirm this? If yes, i am going to open a jira issue.

Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: Submitted values lost - view is "refilled" everytime with model values

2007-05-21 Thread Torsten Krah
Can anyone confirm or deny this?
I'll tried to make this happen in the clay usecase app, but i can't
reproduce it there.
Using my own example - i get this bug everytime.

Torsten

Am Dienstag, den 01.05.2007, 17:08 +0200 schrieb Torsten Krah:
> Got it - maybe.
> 
> This works:
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";
>   xmlns:f="http://java.sun.com/jsf/core";
>   xmlns:h="http://java.sun.com/jsf/html";
>   xmlns:clay="http://shale.apache.org/clay";
>   xmlns:s="http://shale.apache.org/core";
>   xmlns:t="http://myfaces.apache.org/tomahawk";>
> 
> 
> 
> 
> 
> 
> allowbody="false">Content
> 
> 
> 
> 
> This works not:
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> http://www.w3.org/1999/xhtml";
>   xmlns:f="http://java.sun.com/jsf/core";
>   xmlns:h="http://java.sun.com/jsf/html";
>   xmlns:clay="http://shale.apache.org/clay";
>   xmlns:s="http://shale.apache.org/core";
>   xmlns:t="http://myfaces.apache.org/tomahawk";>
> 
> 
> 
> 
> 
> 
> 
> allowbody="false">Content
> 
> 
> 
> 
> 
> Removing the span for the "f:view" which assigns my locale (tested, i
> can use a static value or a EL expression, both works assigning the
> locale), but both breaks the formular.
> 
> Removing the span - magic my formular work, no values are lost.
> Taking it back it breaks again.
> 
> Can anyone confirm this? If yes, i am going to open a jira issue.
> 
> Torsten


smime.p7s
Description: S/MIME cryptographic signature


Re: SV: Submitted values lost - view is "refilled" everytime with model values

2007-04-27 Thread Torsten Krah
Hm read 410 issue but don't "see" the connection yet, can you be a bit
more detailed about it?

Torsten

Am Donnerstag, den 26.04.2007, 21:46 +0200 schrieb Hermod Opstvedt:
> Hi
> 
> I think this is related to [1], since you are missing stuff from scope
> 
> [1] https://issues.apache.org/struts/browse/SHALE-410
> 
> Hermod
> 
> 
> -Opprinnelig melding-
> Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
> Sendt: 26. april 2007 17:51
> Til: user@shale.apache.org
> Emne: Re: Submitted values lost - view is "refilled" everytime with model
> values
> 
> >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-s
> ummary.html
> [2]
> http://opensource.atlassian.com/projects/spring/secure/attachment/12520/Flow
> ExecutionKeyStateHolder.patch
> 
> >Torsten
> 
> 
> Gary
> 


smime.p7s
Description: S/MIME cryptographic signature