cancel
Showing results for 
Search instead for 
Did you mean: 

ISearchComponent Show/Hide Options

Former Member
0 Kudos

Hi all,

I have created my own Search component, I have put it in new Search Component Set with standard_search_input component and now I want to display my component only after "Show Options" is clicked. Now I can see it always, independently on Show/Hide Option.

Is it possible?

Thanks,

Iva

View Entire Topic
D021954
Advisor
Advisor
0 Kudos

Hi Iva,

here a coding example for how to retrieve the 'show otions info' within method 'setSearchParamsMap':

/**

  • Get back the interchange map from parent search dialog control.

  • Relevant information can be read out (eg. display of options state).

  • @see com.sapportals.wcm.control.util.search.ISearchComponent#setSearchParamsMap(com.sapportals.wcm.control.util.search.SearchParamsMap)

*/

public void setSearchParamsMap(SearchParamsMap map) {

// info about just searched

if (map.containsKey(SearchParamConst.PARAM_JUST_SEARCHED)) {

// search hast just been executed, might be helpfull to know

boolean justSearched = ((Boolean)map.get(SearchParamConst.PARAM_JUST_SEARCHED)).booleanValue();

}

// advanced mode

if (map.containsKey(SearchParamConst.PARAM_DISPLAY_SEARCH_OPTIONS)) {

// flag that states if search options are display or not

boolean advanced = ((Boolean)map.get(SearchParamConst.PARAM_DISPLAY_SEARCH_OPTIONS)).booleanValue();

this.persMap.put("CBX",new Boolean(advanced).toString());

}

}

This is also in the "Developing a Search Component for KM Search iView" example of Thilo Brandt:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/41cbcb56-0701-0010-43b4-fbc...

Regards Matthias Röbig-Landau

Former Member
0 Kudos

Great,

it solved my problem.

Thank you very much.

Iva

Former Member
0 Kudos

Hi,

i have the same problem and tried to solve it with the code from the previous answer. But it wont work.

I copied the code from Thilo Brands example to my Search Component, but the Custom Component appears everytime in the searchIView.

Any Ideas?