[MGNLUI-3424] Allow multi-fields (composite, switchable, multi-value) to become read only Created: 12/May/15  Updated: 06/Aug/15  Resolved: 02/Jul/15

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

Type: Bug Priority: Neutral
Reporter: Zdenek Skodik Assignee: Trang Truong
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: 0d
Time Spent: 4d 4.25h
Original Estimate: 5h

Attachments: PNG File ReadOnlySupport.png     Text File magnolia_ui.patch    
Issue Links:
Relates
relation
is related to MGNLUI-3490 Investigate the possibility to stream... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

The readOnly property to be configured for the field is not supported currently.



 Comments   
Comment by Trang Truong [ 29/May/15 ]

Please see attached picture & bootstrap, I've checked with those configs and it works as readOnly added to sub field of multiValue field.

Comment by Benoit Olbrechts [ 04/Jun/15 ]

Hmmm I don't think this is not an issue.

The readOnly property on the MultiValueFieldDefinition is not taken into account.
Therefore the Add button and the trash icon are still available to add/delete elements from the list. (at least in magnolia <= 5.3.8)

I think that those actions should be hidden when this flag is active and maybe that readOnly property should then be herited to the descendant fields!?

@see the attached xml in the ticket SUPPORT-4630 where the filters lists stays editable even with the readOnly flag.

Thanks

Comment by Benoit Olbrechts [ 04/Jun/15 ]

BTW I don't see any attached picture O_o

Comment by Trang Truong [ 05/Jun/15 ]

The attachment probably dropped on the way. Hence, I dragged it in now. And you are right that we should hide the buttons when this flag is active that makes sense than hide only descendant fields.

So I will reopen this issue. I was misunderstanding the case of using MultiValueFieldDefinition here.

Besides, I don't have permission to access SUPPORT-4630.

Comment by Benoit Olbrechts [ 05/Jun/15 ]

Thanks.

I also made the ticket SUPPORT-4630 visible to you

Comment by Eric Hechinger [ 26/Jun/15 ]

Reopened and scope changed.

This is a more generic issue, that affects all multi-fields (Composite/Switchable/Multi)
In addition, read only property has to be propagated to inner fields for example:
A multi-field contains a composite field with two text fields

  • All in read only
    • read only has to be set once on the multi-field level
  • Only one text field in read only
    • read only has to be set to the single text field.

Please check the provided patch

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