on 09-25-2017 12:02 PM
Hi,
Requirement is price should get automatically save, when change for a quote entry without clicking SAVE button in backoffice.
Please let me your inputs to achieve this in back office .
Thanks,
Pankaj
Hi,
If you are working on at least 6.1 version of hybris, then there is an interface com.hybris.cockpitng.widgets.baseeditorarea.EditorAreaLogicHandler
with default implementation com.hybris.cockpitng.widgets.baseeditorarea.DefaultEditorAreaLogicHandler
defined as editorAreaLogicHandler
spring bean. I would go with writing my own (extending default one), defining it as spring bean and pointing to it in configuration for quote entry (`handler` attribute on editorArea
element). There is a method #beforeEditorAreaRender
which allows to register any listener you wish (I'd go with widgetModel.addObserver(DefaultEditorAreaController.MODEL_VALUE_CHANGED, ...)
)
Cheers, Jacek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jacek,
Thanks for your suggestion.
I have implemented #beforeEditorAreaRender
in my own logic handler extending DefaultEditorAreaLogic Handler
and pointing to quote entry ( logic-handler
attrribute on editorArea element in *-backoffice-cofig.xml)
<context merge-by="type" parent="AbstractOrderEntry" type="QuoteEntry" component="koopmanSalesRepBackofficeEditorArea">
<editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" logic-handler="quotePriceLogicHandler">
</editorArea:editorArea>
</context>
My Logichandler#BeforeEditorAreaRender goes like this-
QuotePriceLogicHandler#beforeEditorAreaRender(final WidgetInstanceManager widgetInstanceManager,
final Object currentObject)
final QuotePriceObserver priceObserver = new QuotePriceObserver();
widgetInstanceManager.getModel().addObserver(DefaultEditorAreaController.MODEL_VALUE_CHANGED,
priceObserver.init());
But this is not working for my problem statement.
Please suggest me where i am going wrong here. Might be an issue with ValueObserver, but i am not able find out how valueobserver works or else any other suggestion to achieve this, i am using Hybris 6.3 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
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.