Inline-Edit of a Component in a Display View JS - WEM 16.2

Hello,
I’m using a DisplayView JS in the WEM 16.2, but I have a problem to use the Inline-Edit in a Component (SmartList). When I click in edit in the preview, I can edit and change the text, but when I click in Save, and try to see the result, the text continues with the original value

Javascript Code:

var component = otDisplayView.getComponentBean();
var titleInline = otDisplayView.textInlineEdit(component.system.id, "title", component.title);

Template Code:
<h2>{{{titleInline}}}</h2>

The HTML generated in preview:
<h2> <div id="inline-text-de8c16dacbd8d610VgnVCM1000004000000aRCRD-title" contenteditable="false" formattingtoolsenabled="false" oid="de8c16dacbd8d610VgnVCM1000004000000aRCRD" attributexmlname="title" relationidentity="" isvalid="true" iscomponent="true" class="" showcontextmenu="false">Lists of Contents</div> </h2>

Thanks.

Answers

  • Did you try refreshing the page? Does the value appear after that?
    textInLineEdit() function probably ends without refreshing the component or the page, thus shows original cached value.