Ticket #208 (closed Defect: fixed)
View Configuration default values are not reflected in GUI
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.1 |
Component: | DeepaMehta Standard Distribution | Version: | 4.0.9 |
Keywords: | Cc: | Malte, dgf, JuergeN | |
Complexity: | 3 | Area: | |
Module: |
Description (last modified by jri) (diff)
Particularly, this is a problem in conjunction with the "Editable" and "Viewable" settings. These are TRUE by default. But when editing a View Configuration topic this is not reflected in the GUI. Thus, once the form is submitted they are unintendedly set to FALSE. This results in invisible and not editable topic info. No Edit button appears.
Change History
comment:2 Changed 13 years ago by jri
As a workaround ensure "Editable" and "Viewable" are checked when editing a View Configuration topic.
comment:4 Changed 12 years ago by jri
- Cc dgf added
Workaround appendix: For text and html types you must also set the "Rows" setting to an integer. That is the size -- the number of rows -- of the text/html editor field. To have a single-line input field specify 1.
comment:6 follow-up: ↓ 7 Changed 12 years ago by JuergeN
We should fix this soon. I always forget to set these values and then I wonder why my composite does not work.
comment:7 in reply to: ↑ 6 Changed 12 years ago by jri
Replying to JuergeN:
We should fix this soon. I always forget to set these values and then I wonder why my composite does not work.
Fully agreed!
Unfortunaltely its not a trivial fix.
(there is an overriding mechanism involved: the assoc def view config settings can override individual view config settings of the child type. In order to not override by accident at the assoc def we would need a "not specified" value. But "not specified" values are not a concept of the current core's data model. We have to do conceptual work here.)
Anyway, I will try to find a solution with the upcoming 4.1 release.
comment:8 Changed 12 years ago by jri
- Complexity changed from 5 to 3
As a quick solution for 4.1 I intend to reverse the semantics of the 2 checkboxes in question:
- "Editable" -> "Locked"
- "Viewable" -> "Hidden"
comment:9 Changed 12 years ago by Jörg Richter
Webclient: fix missing view config values (#208).
The default values of the view configuration "Viewable" and "Editable" settings are reflected in the GUI.
Actually their semantics is reversed and the settings renamed accordingly:
"Viewable" -> "Hidden"
"Editable" -> "Locked"
Pending for the "Rows" setting.
BREAKING CHANGES
2 Webclient URIs are changed and semantics is inverted:
"dm4.webclient.viewable" -> "dm4.webclient.hidden"
"dm4.webclient.editable" -> "dm4.webclient.locked"
In your plugins you must perform a search/replace accordingly and invert the value.
Especially your JSON migration files might be affected, e.g.
view_config_topics: [ { type_uri: "dm4.webclient.view_config", composite: { dm4.webclient.viewable: false, # -> dm4.webclient.hidden: true, dm4.webclient.editable: false # -> dm4.webclient.locked: true } } ]
Defaults are hidden=false and locked=false.
See ticket 208.
comment:10 Changed 12 years ago by Jörg Richter
Webclient: fix view config "Rows" default (#208).
This (client-side) error does not accur anymore:
TextRendererError: field "xx" has no "rows" setting
If no "Rows" value is set (or if it is 0) then 1 is used as the default.
The "Rows" setting is renamed:
"Rows" -> "Input Field Rows"
BREAKING CHANGES
1 view config URI is changed:
"dm4.webclient.rows" -> "dm4.webclient.input_field_rows"
In your plugins you must perform a search/replace accordingly.
Especially your JSON migration files might be affected, e.g.
view_config_topics: [ { type_uri: "dm4.webclient.view_config", composite: { dm4.webclient.rows: 15 # -> dm4.webclient.input_field_rows: 15 } } ]
NOTE 1: your custom renderers might need to be adapted. The "rows" property of the "page_model" object that is passed to the renderer functions is renamed to "input_field_rows".
NOTE 2: an association definition can no longer override a child type's view configuration setting with a falsish value (0, "", false). This is regarded as not needed anymore because the semantics of the former "Viewable" and "Editable" settings is inverted (see last commit).
See ticket 208.
comment:11 Changed 12 years ago by jri
- Status changed from accepted to closed
- Resolution set to fixed
comment:12 Changed 12 years ago by dgf
replace script
find src -name "*.j*" -type f | grep -v vendor | xargs -IFILE sed \ -e 's/dm4.webclient.viewable: false/dm4.webclient.hidden: true/' \ -e 's/dm4.webclient.viewable: true/dm4.webclient.hidden: false/' \ -e 's/dm4.webclient.editable: false/dm4.webclient.locked: true/' \ -e 's/dm4.webclient.editable: true/dm4.webclient.locked: false/' \ -e 's/dm4.webclient.rows/dm4.webclient.input_field_rows/' \ -i FILE
comment:13 Changed 12 years ago by Jörg Richter
Webclient: fix view config overriding (#208).
This change introduced 2 days ago is now reverted:
NOTE 2: an association definition can no longer override a child type's view configuration setting
with a falsish value (0, "", false). This is regarded as not needed anymore because the semantics
of the former "Viewable" and "Editable" settings is inverted (see last commit).
Now the view config overriding bahavoir is exactly like before: you can override with falsish values.
Thanks, dgf for reporting!
See ticket 208.
comment:14 Changed 12 years ago by Jörg Richter
Webclient: fix again view config defaults (#208).
This (client-side) error does not accur anymore:
TextRendererError: field "xx" has no "input_field_rows" setting
If no "Input Field Rows" value is set (or if it is 0) then 1 is used as the default.
Was fixed already but broke 3 days ago.
See ticket 208.
comment:15 Changed 12 years ago by Jörg Richter
Webclient: rename 2 view config settings (#208).
BREAKING CHANGES
2 view configuration settings are renamed:
"Add To Create Menu" -> "Show in Create Menu"
"Is Searchable Unit" -> "Searchable as Unit"
The corresponding URIs are changed accordingly:
"dm4.webclient.add_to_create_menu" -> "dm4.webclient.show_in_create_menu"
"dm4.webclient.is_searchable_unit" -> "dm4.webclient.searchable_as_unit"
In your plugins you must perform an URI search/replace, particularily in the JSON files.
You must reset the DB.
See ticket 208.