Content Management and Capture

 View Only
  • 1.  How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    Posted Thu December 07, 2023 08:34 AM

    Hi,

    I need to retrieve the name or title of the search user is viewing. Even if there are multiple searches opened - I only want the one the user is using.

    For reference - I retrieved user id with ecm.model.Desktop.userid - are there any equivalent functions for retrieving the name or title of an opened search?

    Content Navigator 3.x

    Repository: Content Manager OnDemand



    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------


  • 2.  RE: How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    Posted Thu December 07, 2023 08:36 AM

    @Christoph Sünderkamp or @JIE ZHANG - you guys have an idea?



    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------



  • 3.  RE: How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    Posted Thu December 07, 2023 12:38 PM

    hi Andreas,

    It may not be possible to retrieve the name or title of the search the user is currently  viewing - assuming he has multiple searches opened.

    But we will review this a bit more and update.



    ------------------------------
    Nanda Pilaka
    IBM Content Navigator Support
    ------------------------------



  • 4.  RE: How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    Posted Fri December 08, 2023 01:37 AM
    Edited by JIE ZHANG Fri December 08, 2023 01:44 AM

    Hi Nanda,

    Agree. We cannot know which one is the user viewing for now. 

    Hi Andreas,

    Would you please help us to know what is the purpose of it? When the search is submit to backend to do anything, I'd think the search name will be with it.



    ------------------------------
    JIE ZHANG
    ------------------------------



  • 5.  RE: How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    Posted Mon December 11, 2023 04:29 AM

    Thanks for your reply,

    The purpose here is that when the user submit the search - I will make a call to an external webservice including the search name.

    What I have done is that I have extended the _search function from ecm/widget/search/SearchTab - inside the _search function I will need the name of the search

    _search: function (callback) {
        // somewhere here I will need the name of the search
    }


    ------------------------------
    Andreas Baaserud Hauge
    Senior Consultant
    tietoevry
    ------------------------------



  • 6.  RE: How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    Posted Tue December 12, 2023 01:44 AM

    Hi Andreas,

    Then that will be simple. this.searchForm._searchTemplate in that method has all information from the search. Including id, name....



    ------------------------------
    JIE ZHANG
    ------------------------------



  • 7.  RE: How to retrieve name or title of opened search with JavaScript in a Content Navigator Plugin

    IBM Champion
    Posted Mon December 11, 2023 02:48 AM
    Edited by Christoph Sünderkamp Mon December 11, 2023 04:34 AM
    I think you need to implement a plugin for this. What exactly is the use case? Can you describe your requirements in more detail?
     
    It is conceivable to save the search currently active in the interface in a variable by appending code to ecm.widget.search.SearchTabController.onSelectChild(page) within a custom plugin. You can access the searchTemplate from the page argument: page.getSearchTemplate().
     
    As far as I know, there is no "short cut" as with the userId. However, I don't yet understand what you want to do with the information about the active search tab in the interface.
    best regards



    ------------------------------
    Christoph Sünderkamp
    ------------------------------