Thanks :-)

 
-----Original Message-----
From: Gerald Müllan [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 05, 2006 11:01 AM
To: MyFaces Discussion
Subject: Re: Disabled inputText Value

Yes; that`s right! Values in disabled fields are never submitted and
thus dont affect the underlying model.

But there is a solution in JSF since a few weeks. Have a look at the
"disabledOnClientSide" property. With it, there is a hidden field
rendered (stands for the disabled field) and the value of the disabled
field put into it. Values from hidden fields are submitted, and
consequently it is possible to push the disabled value to the model.

Hope that helps,

Cheers,

Gerald

On 5/5/06, Uri Kalish <[EMAIL PROTECTED]> wrote:
> Thanks dude. I found the problem. It's an HTML form thing - A form submitting 
> will not post disabled fields.
> Because in the case of error I want to re-display the page exactly as it was 
> when the user submitted (I don't want fields changed by the user to jump to 
> default values just because he clicked a radio that made them disabled)...
> No choice but to use an extra hidden field and update it by java script when 
> the regular field changes.
> Very low-tech I'm afraid...
>
> ________________________________
>
> From: Le Van [mailto:[EMAIL PROTECTED]
> Sent: Fri 05-May-06 04:18
> To: MyFaces Discussion
> Subject: Re: Disabled inputText Value
>
>
>
> Uri Kalish wrote:
>
> > Use case:
> >
> > A user fills a value in an inputText field, checks a radio button that
> > causes the field to become disabled, and submits the form.
> >
> > After the user submits, the value received is null, no matter what the
> > field displays on the UI...
> >
> > Is there a way to retrieve that value although the field is disabled,
> > or must I use an extra hidden field and update it by java script.
> >
> >
> > ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.com/email
> > ______________________________________________________________________
>
> As I know you can't retrieve value from input field that is disabled. I
> try it by using java script
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>


--
Gerald Müllan
Schelleingasse 2/11
1040 Vienna, Austria
0043 699 11772506
[EMAIL PROTECTED]

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Reply via email to