on 2023 Sep 19 5:42 PM
I have components that are mostly render its content via Javascript code. The component initially looks fine in SmartEdit when the page is loaded. However, when the component is edited, it is no longer able to render itself. I think SmartEdit reloads the component from the backend but is not capable of rendering the component when it heavily relies on client-side code. There must be some kind of event (I hope) that I can intercept after a component is refreshed so I can trigger the client-side rendering of my component.
I am using SAP Commerce 2211 with accelarator storefront.
Request clarification before answering.
Hi phoude
Please reference the following two links in order to achieve what you are attempting to do:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is working but it is not...
1) According to the documentation, if I make a modification to a component, the componentId should have the id of that component and parentId should be the id of the content slot. However, each time I modify a component, I get the componentId of the contentSlot and parentId is null.
I have done this very simple code to check it out.
window.smartedit.renderComponent = function(a,b,c) { console.log(a); console.log(b); console.log(c); }
2) I also tested the addOnReprocessPageListener and it appears this is being called twice every time I modify a component.
window.smartedit.addOnReprocessPageListener(function () {console.log('page reprocessed')});
User | Count |
---|---|
21 | |
19 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.