cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hiding the search button in backoffice

0 Likes
519

Hi all,

I am trying to hide the search button in collaboration area-->overview section of backoffice. Any leads over this requirement would be very helpful. Thanks!

-Ashweeja

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member437308
Active Participant
0 Likes

Hello,

Unfortunately, there is no such a setting in the Simple Search and Filters widget. You have to provide some custom code to the widget to achieve it. The best would be to extend the class the FullTextSearchController and override a method public void initialize(final Component comp) like below:

 public class CustomFullTextSearchController extends FullTextSearchController
 {
     @Override
     public void initialize(final Component comp) {
         super.initialize(comp);
         searchBox.setVisible(false);
         searchButton.setVisible(false);
     }
 }


It will remove the search button from each Simple Search and Filters widget instance in a mashup. If you only want to remove it from one place you have to create your own widget by extending Simple Search and Filters (how to extend widget) and change the mashup (replace widget for your custome one in *-widgets.xml file)

 <widget-extension widgetId="workflowDetails-tasks-collectionbrowser">
     <remove widgetId="workflowDetails-tasks-fulltext-search"/>
         <widget id="workflowDetails-tasks-fulltext-search" widgetDefinitionId="com.hybris.cockpitng.customfulltextsearch"
                     slotId="toolbarCenter">
                 <setting key="fulltextSearchConfigCtxCode" type="String">workflowDetails-tasks-fulltext-search</setting>
                 <virtual-sockets/>
             </widget>
 </widget-extension> 

Regards,
Tomek

0 Likes

Thank you for the response Tomek! Followed the approach of overriding the OOTB css in my custom extension and it worked for me.