I tried to change this ..

   <t:textfield t:id="email" name="email" size="30" value="email"
validate="email, required" disabled="user" />

... which disabled the field if user is present to something that set's
readonly when user is present but failed.

Closest to success where

   <t:textfield t:id="email" name="email" size="30" value="email"
validate="email, required" readonly="readonly" />

    public String getReadOnly() {
        return getUser() != null ? "readonly" : "false";
    }

But that failed due to a bug (in chrome !?) that sets readonly even if the
html is readonly="false".  w3schools states ...
*
*
*Note:* The readonly attribute is a boolean attribute, and can be set in
the following ways:

   - <input readonly>
   - <input readonly="readonly">
   - <input readonly="">


So on my wishlist (not very important due) is to make readonly into a T5
component parameter for textfield and passwordfield ...

I have solved this for now but not being dependent on that the form returns
my disabled field.

2011/11/27 Martin Strand <do.not.eat.yellow.s...@gmail.com>

> On Sun, 27 Nov 2011 22:46:18 +0100, Gunnar Eketrapp <
> gunnar.eketr...@gmail.com> wrote:
>
>  T5.3 looks promising and it felt quite faster.
>>
>> The two major concerns where
>>
>> 1) My user types didn't work in forms.
>> 2) Disabled field did not work in forms. (The value was not passed back)
>>
>> Of course I must have missed something obviously but I decided to
>> wait with T5.3 until these questions are sorted out.
>>
>
>
> 2) is standard behaviour - the browser is not supposed to submit values of
> disabled fields.
> Not sure how your page works, but perhaps you'd want to use "readonly"
> instead?
> http://reference.sitepoint.**com/html/input/readonly<http://reference.sitepoint.com/html/input/readonly>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo

Reply via email to