meta data for this page
Minor Improvements of Backoffice's User-Friendliness
How to add inline edition of lists
The fields stopWords, keywordRedirects and synonyms of the hybris type SolrFacetSearchConfig are difficult to edit on the backoffice. With the following code you turn on the inline editing of the synonyms and you can apply this to any other one-to-many relation.
<context type="SolrSynonymConfig" component="inLineEditorConfig"> <list-view:list-view xmlns:list-view="http://www.hybris.com/cockpitng/component/listView"> <list-view:column qualifier="synonymFrom" /> <list-view:column qualifier="synonymTo" /> <list-view:column qualifier="language" /> <list-view:column qualifier="facetSearchConfig" /> </list-view:list-view> </context> <context merge-by="type" type="SolrFacetSearchConfig" component="editor-area"> <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea"> <editorArea:tab name="hmc.tab.configuration.solrconfig.synonym"> <editorArea:section name="hmc.sec.configuration.solrconfig.synonym"> <!-- Remove out-of-the-box editor --> <editorArea:attribute qualifier="languageSynonymMapping" merge-mode="REMOVE" /> <!-- Make this custom panel wider --> <editorArea:customPanel name="exportSolrConfiguration" spring-bean="exportSolrConfigurationPanelRenderer" colspan="4"> <editorArea:render-parameter> <editorArea:name>dataModelProperty</editorArea:name> <editorArea:value>currentObject</editorArea:value> </editorArea:render-parameter> </editorArea:customPanel> <editorArea:panel name="solrFacetSearchConfigSynomymsPanel" colspan="4"> <editorArea:attribute xmlns="http://www.hybris.com/cockpitng/component/editorArea" editor="com.hybris.cockpitng.editor.extendedmultireferenceeditor" qualifier="synonyms"> <editorArea:editor-parameter> <editorArea:name>listConfigContext</editorArea:name> <editorArea:value>inLineEditorConfig</editorArea:value> </editorArea:editor-parameter> <editorArea:editor-parameter> <editorArea:name>inlineEditing</editorArea:name> <editorArea:value>true</editorArea:value> </editorArea:editor-parameter> <editorArea:editor-parameter> <editorArea:name>inlineEditingParams</editorArea:name> <editorArea:value>priority</editorArea:value> </editorArea:editor-parameter> </editorArea:attribute> </editorArea:panel> </editorArea:section> </editorArea:tab> </editorArea:editorArea> </context>
Correction of the display and edition of time fields
Fields with date values are displayed in the wrong timezone during summer in Germany because the datetime editor widget on backoffice loads timezones without Daylight Saving Times (DST) from the ZK session like GMT+2:00 and GMT+1:00.
To correct this display error, you have to configure the right timezone on the backoffice configuration:
<context type="OpeningDay" component="editor-area" merge-by="type"> <editorArea:editorArea> <editorArea:tab name="hmc.tab.common"> <editorArea:section name="hmc.sec.details"> <editorArea:attribute qualifier="openingTime" editor="com.hybris.cockpitng.editor.defaulttime"> <editorArea:editor-parameter> <editorArea:name>selectedTimeZone</editorArea:name> <editorArea:value>Europe/Berlin</editorArea:value> </editorArea:editor-parameter> <editorArea:editor-parameter> <editorArea:name>displayedTimeZones</editorArea:name> <editorArea:value> Europe/Berlin </editorArea:value> </editorArea:editor-parameter> </editorArea:attribute> <editorArea:attribute qualifier="closingTime" editor="com.hybris.cockpitng.editor.defaulttime"> <editorArea:editor-parameter> <editorArea:name>selectedTimeZone</editorArea:name> <editorArea:value>Europe/Berlin</editorArea:value> </editorArea:editor-parameter> <editorArea:editor-parameter> <editorArea:name>displayedTimeZones</editorArea:name> <editorArea:value> Europe/Berlin </editorArea:value> </editorArea:editor-parameter> </editorArea:attribute> <editorArea:attribute qualifier="startPauseTime" editor="com.hybris.cockpitng.editor.defaulttime"> <editorArea:editor-parameter> <editorArea:name>selectedTimeZone</editorArea:name> <editorArea:value>Europe/Berlin</editorArea:value> </editorArea:editor-parameter> <editorArea:editor-parameter> <editorArea:name>displayedTimeZones</editorArea:name> <editorArea:value> Europe/Berlin </editorArea:value> </editorArea:editor-parameter> </editorArea:attribute> <editorArea:attribute qualifier="endPauseTime" editor="com.hybris.cockpitng.editor.defaulttime"> <editorArea:editor-parameter> <editorArea:name>selectedTimeZone</editorArea:name> <editorArea:value>Europe/Berlin</editorArea:value> </editorArea:editor-parameter> <editorArea:editor-parameter> <editorArea:name>displayedTimeZones</editorArea:name> <editorArea:value> Europe/Berlin </editorArea:value> </editorArea:editor-parameter> </editorArea:attribute> </editorArea:section> </editorArea:tab> </editorArea:editorArea> </context> <context type="OpeningDay" component="referenceListView"> <list-view:list-view xmlns:list-view="http://www.hybris.com/cockpitng/component/listView"> <!-- Because we can't set the editor of the column, we don't show the closing and opening times --> <list-view:column qualifier="openingTime" merge-mode="REMOVE" /> <list-view:column qualifier="closingTime" merge-mode="REMOVE" /> <list-view:column qualifier="openingSchedule" /> </list-view:list-view> </context>
Now 1970-01-01T9:00 will be displayed as 9:00 on summer and winter in Germany. Unfortunately I couldn't correct the display of times on the reference list view.
– Based on SAP commerce 1905
Discussion