[MGNLUI-3448] Form field read-only state should take into account underlying data-source's ability to persist changes. Created: 29/May/15  Updated: 31/Jan/17  Resolved: 31/Jan/17

Status: Closed
Project: Magnolia UI
Component/s: app
Affects Version/s: None
Fix Version/s: 5.4.2

Type: Task Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Aleksandr Pchelintcev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: Form field attributes handling
Story Points: 3

 Description   

Currently one can use the edit action in new resources app and edit the resource, even though,the resource is read only.

This should be fixed and editor should take into account the readonly option of a given resource.



 Comments   
Comment by Mikaël Geljić [ 29/May/15 ]

BasicTransformer only reads value from original vaadin Property upon #readFromItem(), and sets it on the TransformedProperty, yet it completely ignores readonly status of that original Property; only marks it as such if definition says so...

As this should be fixed in UI, let's be careful about potential side-effects.

Comment by Mikaël Geljić [ 06/Jun/15 ]

No longer critical for new resources-app, it now uses two standalone subapps for viewing (readonly) and editing (JCR, writable).

So we have a bit more time to check for impact.

Comment by Ilgun Ilgun [ 15/Jun/15 ]

Found out that, we still need it even with two subapps(edit and preview).

  • Edit: There is no issue here given we want to edit this resource.
  • Preview: Here even the resource should be just previewed. Without this ticket, we are able to edit it in preview subapp.
    Then we are hitting to NotImplementedException.

Finally, Fix is still valid(fixing the problem of preview subapp).

Comment by Aleksandr Pchelintcev [ 23/Jun/15 ]

Pls double-check whether following is possible:
1) Transformer#isPropertyReadonly() -> simply Transformer#isReadonly()?
2) Since the Transformer impls get the def anyway - make it's isPropertyReadonly method take definition into account
3) in TransformedProperty - override isReadOnly() method and delegate it to the transformer
then it would look slimmer and more logical

Comment by Ilgun Ilgun [ 23/Jun/15 ]

Made proposed changes and pushed to branch MGNLUI-3448

Comment by Ilgun Ilgun [ 08/Jul/15 ]

This ticket was integrated and reverted afterwards due to some test failures.
I solved most of the problems however, there is still work to do here.

Comment by Mikaël Geljić [ 31/Jan/17 ]

Closing this, as this was taken over back in August 2015, and resulted in an integrated fix.

MGNLUI-3448 Make TransformedProperty delegate read-only state to Transformer.{quote)

Generated at Mon Feb 12 09:06:43 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.