Shjape and dtype are NOT editable but visible in UI.
Fix.
... | @@ -197,6 +197,10 @@ | ... | @@ -197,6 +197,10 @@ |
<key> <string>alternate_name</string> </key> | <key> <string>alternate_name</string> </key> | ||
<value> <string></string> </value> | <value> <string></string> </value> | ||
</item> | </item> | ||
<item> | |||
<key> <string>autocomplete</string> </key> | |||
<value> <string></string> </value> | |||
</item> | |||
<item> | <item> | ||
<key> <string>css_class</string> </key> | <key> <string>css_class</string> </key> | ||
<value> <string></string> </value> | <value> <string></string> </value> | ||
... | @@ -219,7 +223,7 @@ | ... | @@ -219,7 +223,7 @@ |
</item> | </item> | ||
<item> | <item> | ||
<key> <string>editable</string> </key> | <key> <string>editable</string> </key> | ||
<value> <int>1</int> </value> | <value> <int>0</int> </value> | ||
|
|||
</item> | </item> | ||
<item> | <item> | ||
<key> <string>enabled</string> </key> | <key> <string>enabled</string> </key> | ||
... | @@ -235,7 +239,7 @@ | ... | @@ -235,7 +239,7 @@ |
</item> | </item> | ||
<item> | <item> | ||
<key> <string>hidden</string> </key> | <key> <string>hidden</string> </key> | ||
<value> <int>1</int> </value> | <value> <int>0</int> </value> | ||
</item> | </item> | ||
<item> | <item> | ||
<key> <string>input_type</string> </key> | <key> <string>input_type</string> </key> | ||
... | ... |
-
mentioned in merge request !161 (merged)
-
Maintainer
@klaus , it is a real surprise how a form field editable attribute can break the tutorial. As I do not know the JS visual part at all can you please share the part of code which breaks?
The reason for my change is that dtype and shape are NOT UI editable (it prevented ERP5 Form from saving on Data Array). So this change is good but anyway I want to investigate the broken tutorial part.
-
Owner
The problem is when accessing the array from javascript in jio: https://wendelin.nexedi.com/wendelin-HowTo.Create.Notebook.with.Graphs/WebPage_viewAsWeb wendelin.js uses the dtype and shape information it gets from jio to calculate the range request. The jio.get used in this tutorial does not return the dtype and shape if the fields are readonly. This is why they were writable but hidden. Of course this was only a workaround and a real solution must be found. One solution would be to create another hal style for accessing the array information from jio (separate api access from ui), then we do not have the risk to break it when we change the user interface.
-
mentioned in merge request !162 (merged)