![]() |
|
|
|
|
Change By:
|
Roman Kovařík
(05/Mar/14 3:32 PM)
|
|
Assignee:
|
Mikaël Geljic
Roman Kovařík
|
|
Description:
|
When saving a SwitchableField called 'switch', with its default transformer
Steps to reproduce
:
- Default selection is ignored (expected
# Go
to
save at least the 'switch' property to the name of the default selected option)
http://localhost:8080/magnoliaAuthor/
.
magnolia/admincentral#app:pages:detail;/demo
-
Default value of the default selection is ignored (expected to save e.g. switchtext = myDefaultTextValue)
features/special
-
Only when entering changes in one of the fields will then save all properties at once.
templates:edit
Hint: We mostly need to trigger transformer to write to the item on switchable selection changes (see selectionListener)
# Add teaser {{RSS Combined Feed Paragraph}}
.
{code}
As a side note
Caused by
:
- There should
java.lang.ClassCastException: java.lang.Long cannot
be
no preselection when using radio buttons, unless explicitly configured
cast to java.lang.String at info.magnolia.ui.form.field.factory.SelectFieldFactory.createDefaultValue
(
option selected=true
SelectFieldFactory.java:251
)
- For select dropdowns, in case there is no default preselection,
at info.magnolia.ui.form.
field
should behave like a native select, i
.
e
factory
.
never be blank and show first option
AbstractFieldFactory
.
setPropertyDataSourceDefaultValue(AbstractFieldFactory.java:150)
- Finally, we should save switchable
at info.magnolia.ui.form.
field
's subfields 'on demand'
.factory.SelectFieldFactory.setPropertyDataSourceAndDefaultValue
(
currently it's just all at once)
SelectFieldFactory
.
java:229)
------ Original description ------
Using {{
at
info.magnolia.ui.form.field.
definition
factory
.
SwitchableFieldDefinition}} with hidden fields
AbstractFieldFactory.createField
(
see attached configuration
AbstractFieldFactory.java:112
)
results in two bugs
at info.magnolia.ui.dialog.formdialog.FormBuilder.buildReducedForm(FormBuilder.java
:
165)
- original switch is not reflecting its default value which is not saved
at info.magnolia.ui.dialog.formdialog.FormBuilder.buildForm(FormBuilder.java:106)
- even when switch is set to reveal hidden fields their default values are ignored as well on save
at info.magnolia.ui.dialog.formdialog.FormDialogPresenterImpl.buildView(FormDialogPresenterImpl.java:131)
at info.magnolia.ui.dialog.formdialog.FormDialogPresenterImpl.start(FormDialogPresenterImpl.java:115)
Steps to reproduce using attached config
at info.magnolia.ui.dialog.formdialog.FormDialogPresenterImpl.start(FormDialogPresenterImpl.java
:
91)
at info.magnolia.pages.app.action.CreateComponentAction.openDialog(CreateComponentAction.java:139)
* Open the dialog and save without any other
at info.magnolia.pages.app.
action
.CreateComponentAction.access$200(CreateComponentAction.java:82)
** default value of the {{SwitchableFieldDefinition}} should be saved but it's not ** default values of hidden properties should be saved as well
at info.magnolia.pages.app.action.CreateComponentAction$ComponentCreationCallback.onSuccess
(
in this case may be intention to not save them
CreateComponentAction.java:221
)
* Open the
at info.magnolia.ui.
dialog
, set the SwitchableFieldDefinition to true
.action.CallbackDialogAction.execute
(
which will result in revealing two other fields
CallbackDialogAction.java:58
)
, then save
** default value of
at info.magnolia.ui.api.action.AbstractActionExecutor.execute(AbstractActionExecutor.java:74) ... 112 more
{
{SwitchableFieldDefinition
code
}
} is saved properly this time ** however underlying properties are still ignored until modified
|
|
|
|
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]>
----------------------------------------------------------------