Your right, I not clear enough.
I want to set a field in a form to read only by default: a javascript will made it writable later if required.
Proposed solution made a full read only form.

Esbach, Brandon wrote on 28/06/2006 15:01:
Hi,
 
Not sure what it is you're wanting to do - if I assume correctly that you just want to show a field's value as readonly then the following will do this for you:
 
$doc.display("userName", "view", $object))
The "view" can be set to "edit" to allow editing.
$doc is the active document object (automatically generated when you view the document); and $object is the object where the field is referenced, for example in a class.
 
Ok, not a good example, but I hope this helps..

From: Arnaud BOURREE [mailto:arnaud.bourree@gemalto.com]
Sent: 28 June 2006 13:30
To: xwiki-users@objectweb.org
Subject: [xwiki-users] How to made readonly text input

Hello,

I reuse code from Polls (proposal for a voting system) to made a text input:
println(doc.displayEdit(cclass.get(field.getName()), "${doc.getFullName()}_", survey))
After I try to made it read only:
field.setStringValue("readonly","readonly")
But it doesn't work: output html doesn't contain readonly attribute.

Who can help me?

Regards,

Arnaud Bourrée

--

Arnaud BOURREE
Senior Technical Architect
Gemalto Service CISMEA
Tel: +33 44236 5442
Fax: +33 44236 4499
Avenue du Jujubier, Z.I Athelia IV
13702 La Ciotat Cedex, FRANCE
arnaud.bourree@gemalto.com
www.gemalto.com