You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Martin Marinschek <ma...@gmail.com> on 2005/02/17 16:34:40 UTC

Submitted values

Hi there my fellow MyFaces developers,

to clear an issue that has been popping up several times the last days
on the mailing lists, I want to attempt a clarification.

The following is my point of view, please correct me if I am wrong!

- a submitted value is nothing which ought to have a life after a request
- a submitted value does exist only to make sure that validation can
properly check the submitted value, if validation fails, the submitted
value is rendered instead of the value of the component and the value
of the component is kept, if validation is successful, the submitted
value is set onto the component as the component value

and therefore for the tabbed panel -component:

- if the component on the tabbed panel will not be rendered in the
response and the submitted value is not written through to the managed
bean, the submitted value will be lost!
- this is why the tabbed panel will not let you switch to another tab
if the validation fails; the component will need to be rendered again
so that the submitted value is remembered.

regards,

Martin

Re: Submitted values

Posted by Heath Borders <he...@gmail.com>.
I totally agree with Martin on this.


On Thu, 17 Feb 2005 16:34:40 +0100, Martin Marinschek
<ma...@gmail.com> wrote:
> Hi there my fellow MyFaces developers,
> 
> to clear an issue that has been popping up several times the last days
> on the mailing lists, I want to attempt a clarification.
> 
> The following is my point of view, please correct me if I am wrong!
> 
> - a submitted value is nothing which ought to have a life after a request
> - a submitted value does exist only to make sure that validation can
> properly check the submitted value, if validation fails, the submitted
> value is rendered instead of the value of the component and the value
> of the component is kept, if validation is successful, the submitted
> value is set onto the component as the component value
> 
> and therefore for the tabbed panel -component:
> 
> - if the component on the tabbed panel will not be rendered in the
> response and the submitted value is not written through to the managed
> bean, the submitted value will be lost!
> - this is why the tabbed panel will not let you switch to another tab
> if the validation fails; the component will need to be rendered again
> so that the submitted value is remembered.
> 
> regards,
> 
> Martin
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: Submitted values

Posted by Sean Schofield <se...@gmail.com>.
> Hi there my fellow MyFaces developers,
> 
> to clear an issue that has been popping up several times the last days
> on the mailing lists, I want to attempt a clarification.
> 
> The following is my point of view, please correct me if I am wrong!
> 
> - a submitted value is nothing which ought to have a life after a request
> - a submitted value does exist only to make sure that validation can
> properly check the submitted value, if validation fails, the submitted
> value is rendered instead of the value of the component and the value
> of the component is kept, if validation is successful, the submitted
> value is set onto the component as the component value

I agree 100% with the above statements.

> and therefore for the tabbed panel -component:
> 
> - if the component on the tabbed panel will not be rendered in the
> response and the submitted value is not written through to the managed
> bean, the submitted value will be lost!

I also agree with this.  This was basically my theory on why Sylvain
was having a problem with his checkboxes.  He was also using dataTable
but a simple test using checkboxes (that don't appear on every tab)
without dataTable should be able to clarify this.

> - this is why the tabbed panel will not let you switch to another tab
> if the validation fails; the component will need to be rendered again
> so that the submitted value is remembered.

Not sure about that but it sounds plausible enough.  I just haven't
looked that close at tab panel.

As I mentioned earlier, I have a lot of concerns with the behavior of
tab panel.  If we implmented using <div> instead of submitting we
could avoid a *ton* of complicated issues like this.  I will save that
discussion for later when I have time to offer a constructive
alternative.
 
> Martin

sean