aadrian opened a new issue, #14233:
URL: https://github.com/apache/grails-core/issues/14233

   The possibility to configure that a field in `f:field` or more fields in 
`f:all` to be `readonly` seems to be missing :( . 
   
   Even if one passes this attibute, it's being ignored :( .
   
   It is very frequent scenario that some fields need to be readonly e.g. when 
editing vs creating.
   
   Thank you.
   
   
   ----
   **Edit on 20-March to clarify**:
   This issue consists of **two** parts, both related to the "readonly 
handling" in this plug-in:
    1. support in `<f:all` tag, e.g. something like `<f:all bean="tableTwo" 
readonly="['strName','strType', 'intgNo']"/>`, since quite often when editing 
an entity after it was created, some fields must not be editable anymore.
    2. support in `<f:field`:
       - the proposed correct way by authors would be to use `<f:field 
bean="tableTwo" property="strType" widget-readonly="true"/>` 
       - users would expected `<f:field bean="tableTwo" property="strType" 
readonly="true"/>` however, since `readonly` is not a custom property to be 
used with `widget-*`, but one that the default templates seem to use.
       - even with `widget-*`, this is still **not** working always correctly, 
since the default templates do not implement this right ( 
grails/grails-views#650 might have helped to see rendering bug):
       - see 
https://github.com/aadrian/fieldbugs1/blob/master/grails-app/views/tableTwo/edit.gsp#L38
  : it is still possible to change the value of `strType` and `intgNo` despite 
being readonly like `strName` (only this one works correctly).  Just run the 
example from https://github.com/aadrian/fieldbugs1 with `grails run-app` to see 
this in action.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to