Issue Type: Bug Bug
Affects Versions: 5.2.2
Assignee: Mikaël Geljic
Components: forms
Created: 05/Mar/14 3:29 PM
Description:

When saving a SwitchableField called 'switch', with its default transformer:

  • Default selection is ignored (expected to save at least the 'switch' property to the name of the default selected option).
  • Default value of the default selection is ignored (expected to save e.g. switchtext = myDefaultTextValue)
  • Only when entering changes in one of the fields will then save all properties at once.

Hint: We mostly need to trigger transformer to write to the item on switchable selection changes (see selectionListener).

As a side note:

  • There should be no preselection when using radio buttons, unless explicitly configured (option selected=true)
  • For select dropdowns, in case there is no default preselection, field should behave like a native select, i.e. never be blank and show first option.
  • Finally, we should save switchable field's subfields 'on demand' (currently it's just all at once).

------ Original description ------

Using info.magnolia.ui.form.field.definition.SwitchableFieldDefinition with hidden fields (see attached configuration) results in two bugs:

  • original switch is not reflecting its default value which is not saved
  • even when switch is set to reveal hidden fields their default values are ignored as well on save

Steps to reproduce using attached config:

  • Open the dialog and save without any other action
    • default value of the SwitchableFieldDefinition should be saved but it's not
    • default values of hidden properties should be saved as well (in this case may be intention to not save them)
  • Open the dialog, set the SwitchableFieldDefinition to true (which will result in revealing two other fields), then save
    • default value of SwitchableFieldDefinition is saved properly this time
    • however underlying properties are still ignored until modified
Fix Versions: 5.2.3
Project: Magnolia UI
Labels: maintenance
Priority: Critical Critical
Reporter: Roman Kovařík
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to