on 2018 Dec 15 1:58 AM
I've created a custom widget with an action button. I want to replace the listviewactions component inside collection-browser with that widget. Is it possible?
Request clarification before answering.
Thanks to both. I really want to replace the toolbar, the goal is to have two separate action buttons on two navigation nodes for the same type. Currently, he has added these two action buttons to the listviewactions component, but both have the same custom type, so the two buttons are shown in the two views. That's why I want to create the two widgets and replace the listviewactions toolbar with them, so I think the way is like you mention, replace the bar with the custom widgets to have the two buttons separated, Am I right? thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Context is definitively available in action! In case of CollectionBrowser you just need to do one thing: in listviewactions configuration set propertyof your action to selectedObjects. This way your action will be rerendered every time selection changes and selection will be available via ActionContext#getData. This is it!
Hi ,
Do you want to replace whole toolbar or just add an action to listview?
If you really want to replace whole toolbar, then it want be so easy... In my opinion you would have to clear listviewactions configuration to get rid of all actions (there is no easy way to actually remove toolbar - you need to remove all actions instead). Then you could use toolbarCenter, put your widget there and then style it in the way that fits your requirements.
If in fact you just want to add an action, then you should follow advice.
Cheers, Jacek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should be possible using the merging mechanism. A merge mode is a string enumeration with the following possible values:
merge: The default mode. The matching element will be merged with the parent element, and all subelements will be processed according to their merging settings.
replace: The matching element will be completely replaced by the new one with all its subelements.
remove: The matching element will be removed.
I have used merge-mode, remove multiple times but I haven't tried replace yet. I think the merge-mode, replace should work for you. Give it a try and let me know if it solves your problem. You can refer https://help.hybris.com/1811/hcd/8bd51bcd8669101486cec32d579bb2c2.html for more information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 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.