6 Replies Latest reply: Apr 14, 2014 12:17 PM by NiranjanTatiparthi RSS

    Showing search results as a popup window




      I have created a page template that has a Search Toolbar added to it. I also have Oracle SES configured. When I enter a text and search, the results are getting shown in the content are of the page template.


      Is there anyway I can show the results as a popup?


      Here is the snippet of Page Definition of the page template that has all the parameters set:


            <taskFlow id="searchtoolbar1" taskFlowId="/oracle/webcenter/search/controller/taskflows/localToolbarSearch.xml#search-toolbar" activation="deferred" xmlns="http://xmlns.oracle.com/adf/controller/binding">


                  <parameter id="searchBoxSize" value="40"/>

                  <parameter id="usePopups" value="always"/>




      Pls note that the parameter usePopups is set to always.


      Can someone please help me figure out how to show the results as a popup?



        • 1. Re: Showing search results as a popup window
          Daniel Merchán


          Are you in version?. Taking a look into the localToolbarSearch Task Flow there is an input parameter as you said called usePopups.


          However, if you take a look into the implementation it calls the oracle.webcenter.search service is called as following:


          <af:commandButton partialSubmit="true" partialTriggers="pgl2" id="goBtn"
                  <rah:resourceActionBehavior id="rah1" serviceId="oracle.webcenter.search" resourceType="searchKeywords"
                  <f:attribute name="searchTaskflow" value="#{pageFlowScope.searchTaskflow}"/>
                  <f:attribute name="serviceIds" value="#{pageFlowScope.serviceIds}" />
                  <f:attribute name="mimeType" value="#{backingBeanScope.localToolbar.sesConfigured ? null :  pageFlowScope.mimeType}"/>
                  <f:attribute name="customAttributes" value="#{backingBeanScope.localToolbar.sesConfigured ? null : pageFlowScope.customAttributes}"/>
                  <f:attribute name="hideRefiners" value="#{backingBeanScope.localToolbar.sesConfigured ? null : pageFlowScope.hideRefiners}"/>
                  <f:attribute name="searchScope" value="#{backingBeanScope.localToolbar.scope != null ? backingBeanScope.localToolbar.scope.GUID : pageFlowScope.searchScope}"/><


          As you can see rah:resourceActionBehavior is not using the input parameter in the useResourcePopup property.


          The question is... Why Oracle has this Input Parameter if the useResourcePopup is set always to 'never'?


          Probably the Task Flow is not prepared to show the results correctly in a Popup yet. You can try to customize and use the parameter in the property and take a look how it works.


          The correct solution is open an Oracle-SR and refer this thread if it helps.


          I hope this help you.


          • 2. Re: Showing search results as a popup window

            Hi ,


            Would this work?


            1) Have a input Text and command button and have SearchResults (/oracle/webcenter/search/controller/taskflows/searchResults.xml#search-view")

            taskflow in a popup with deffered activation.

            2) Once user chooses on search button, The keywords can be set to resourceId parameter of Search Results taskflow and then activate it to show the results.

            • 3. Re: Showing search results as a popup window

              Hi Satish,

              I try your suggestion, I am able to get the search results task flow in a popup. But this one didn't showed the results.

              I even set input text value(user entered KeyWords) as resourceId parameter of the task flow.


              Needs a better solution on this

              • 4. Re: Showing search results as a popup window

                Hi Niranjan,


                Try to make the taskflow work in a simple page by providing all the required parameters and then try to make it work in a popup.

                I will do a POC and let you knw in the meantime..

                • 5. Re: Showing search results as a popup window
                  Daniel Merchán



                  You should set the Refresh property from deferred to IfNeeded. With this every time that an input parameter of the task flow changes then it will refresh and execute the task flow from the beginning.



                  • 6. Re: Showing search results as a popup window

                    Hi Satish,


                    I am able to inkvoke search-results taskflow form the popup, but I still have the following issues.


                    1. Even for the first time (popup invocation) search results task flow is not getting filtered with the input text box value.

                         Here I used viewScoped variable to store inputtext box value and I used the same variable value as input parameter resourceId for the search taskflow ( I even tried setting keywordsInputRendered input paramaeter)


                    2. Rendered taskflow region is occupying the entire page size. I need to know on how to customize this task flow.



                                         <af:panelGroupLayout id="pt_pgl1">

                                            <af:panelGroupLayout id="pt_pgl2" layout="horizontal">

                                               <af:inputText label="" id="pt_it1"


                                               <af:spacer width="10" height="10" id="pt_s1"/>

                                               <af:commandButton text="Search" id="pt_cb1">

                                                  <af:showPopupBehavior popupId="pt_p1"/>


                                               <af:outputText id="xyz"

                                                              value="#{viewScope.searchText eq null ? 'xyz' : viewScope.searchText}"/>


                                            <af:popup id="pt_p1">

                                               <af:dialog id="pt_d1">

                                                  <!--af:region value="#{bindings.maintaskflow1.regionModel}"


                                                  <af:region value="#{bindings.searchview1.regionModel}"






                    Page Definition :

                      <taskFlow id="searchview1"






                                <parameter id="usePopups"            -- It didn't works



                                <parameter id="resourceId"



                                <parameter id="keywordsInputRendered"