Tuesday, June 27, 2017

Fluid Global Search - Setting Focus on the Search Box

Dan Iverson from psadmin.io created a new Idea on MOSC:

Fluid global search box should default the cursor:
https://community.oracle.com/ideas/18507

Workaround:

If the current behavior is causing issues and you would like to set the focus on the search box, then it can be achieved by adding one line of custom code to the following delivered objects (depending on your tools release):

PeopleTools 8.55+:

HTML Object: PT_SEARCH_FMODE
Function: toggleGBLSearchTray
Custom Code:
    /* CSK Customization - Start */
    document.getElementById("PTS_KEYWORDS_GLB").focus();
    /* CSK Customization - End */


PeopleTools 8.54:

If you are using PeopleTools 8.54, then you will not find this function toggleGBLSearchTray in PT_SEARCH_FMODE (since that object does not exist). Look for the same function in PT_PAGE_SCRIPT_FMODE.

HTML Object:  PT_PAGE_SCRIPT_FMODE
Function: toggleGBLSearchTray
Custom Code:
    /* CSK Customization - Start */
    document.getElementById("PTS_KEYWORDS_GLB").focus();
    /* CSK Customization - End */
 

9 comments:

  1. Hi Sasank,

    Very helpful Blog. Thanks for sharing.

    Just one more thing. Is there a way to add the menu on classic home. As we click on classic home from fluid homepage. We do not see any menu on classic home. So Is there any workaround to add the menu on the classic home page?

    ReplyDelete
    Replies
    1. I am assuming you are talking about adding Tiles to the Classic Homepage?

      The Classic Homepage continues to work exactly like it did before. So, if we want content on the Classic Homepage, then we can create pagelets and add them to the Classic Homepage.

      You may want to check out this blog post where I found some differences in how Campus Solutions Classic Homepage works in comparison to other applications.
      https://pe0ples0ft.blogspot.com/2017/04/portal-general-settings-navigation.html

      Delete
  2. Thank you sasank.

    ReplyDelete
  3. Hey Sasank - I was wondering if you could help me with debugging an issue.

    I have an external URL with some customizations made to the signin.html page.

    The signin.html page has something like this:
    p class="pslogintextsmalllabel" align="center" style="font-weight:normal"><%=9001%>

    Do you know where this bind variable(%9001%) is being defined?

    Any pointers will be very helpful.
    - Mani

    ReplyDelete
    Replies
    1. Hi Mani! :) Yes. Most likely should be in the text.properties or error.properties file located on the web server WEB-INF/psftdocs/(YOUR_DOMAIN_NAME)/ folder:

      E.g.:
      /home/psadm2/psft/pt/8.55/webserv/peoplesoft/applications/peoplesoft/PORTAL.war/WEB-INF/psftdocs/ps/

      Let me know if you are able to locate that property.

      Delete
    2. Thanks a ton, Sasank!

      Yes, it worked.

      Delete
  4. Thanks for this and is helpful.

    I am having an issue in ESS FL (HCM 9.2 Image 29 & PT 8.55) Direct Deposit when adding a new direct deposit account. Hoping to get a solution or an idea on how to handle the challenge.

    There is a small customization (DOB Challenge) a user needs to pass before they can add/edit there banking information. So user goes to ESS > Pay ( Nav collection tile) that opens a Nav Collection with Direct Deposit.

    When a user clicks on Direct Deposit > Add - It takes user to the page to enter all banking information (which is display only - page activate pcode) with an "Security Question" button on top. Save button is hidden. Cancel is still there.
    User clicks the Security question button (Field Change Pcode Fires), which opens a modal(DoMOdal) window (with FL Comp & FL page) where user needs to enter DOB and selects ok. When passed the "Security question button disappears (Field Change Pcode)and rest of the banking fields in the page are available for entry with Save button now available. Here is the challenge.

    Non SFF, every thing works well with all fields in the page available (CAncel, Save, BAnk, Branch, account number etc) and able to save data. Its business as usual.

    **But for SFF (Mobile),after a user passes the DOB challenge on Modal, all page fields are available but the "Cancel" & "Save" disappear.
    When i select the Bank Code field, Cancel & Save button appear back. I enter the BAnk ID & Branch ID.. all is well. Now when i select the Account number field,
    the cancel & save again disappear. Only when i select either Bank or Branch Field they (Cancel & Save) reappear and i can save. I am just stuck on this and not able to figure out why (even after trace etc) this strange behavior.


    Like you mentioned in the post, i tried the "Focus()" using AddOnLoadScript or setcursor etc.. none work. But when i add a think time function (messagebox) in the code after DOB challenge then the "Cancel" & "Save" appear after i click ok in
    messagebox. Looks like the component processor just stops after the field change event until further action is take and this happens only on SFF.

    Any thooughts or suggestions on how to handle this issue in SFF.

    ReplyDelete
  5. Thanks for this and is helpful.

    I am having an issue in ESS FL (HCM 9.2 Image 29 & PT 8.55) Direct Deposit when adding a new direct deposit account. Hoping to get a solution or an idea on how to handle the challenge.

    There is a small customization (DOB Challenge) a user needs to pass before they can add/edit there banking information. So user goes to ESS > Pay ( Nav collection tile) that opens a Nav Collection with Direct Deposit.

    When a user clicks on Direct Deposit > Add - It takes user to the page to enter all banking information (which is display only - page activate pcode) with an "Security Question" button on top. Save button is hidden. Cancel is still there.
    User clicks the Security question button (Field Change Pcode Fires), which opens a modal(DoMOdal) window (with FL Comp & FL page) where user needs to enter DOB and selects ok. When passed the "Security question button disappears (Field Change Pcode)and rest of the banking fields in the page are available for entry with Save button now available. Here is the challenge.

    Non SFF, every thing works well with all fields in the page available (CAncel, Save, BAnk, Branch, account number etc) and able to save data. Its business as usual.

    **But for SFF (Mobile),after a user passes the DOB challenge on Modal, all page fields are available but the "Cancel" & "Save" disappear.
    When i select the Bank Code field, Cancel & Save button appear back. I enter the BAnk ID & Branch ID.. all is well. Now when i select the Account number field,
    the cancel & save again disappear. Only when i select either Bank or Branch Field they (Cancel & Save) reappear and i can save. I am just stuck on this and not able to figure out why (even after trace etc) this strange behaviour.


    Like you mentioned in the post, i tried the "Focus()" using AddOnLoadScript or setcursor etc.. none work. But when i add a think time function (messagebox) in the code after DOB challenge then the "Cancel" & "Save" appear after i click ok in
    messagebox. Looks like the component processor just stops after the field change event until further action is take and this happens only on SFF.

    Any thoughts or suggestions on how to handle this issue in SFF.

    ReplyDelete
    Replies
    1. That is strange. While I don't have an easy way to reproduce this and provide solutions, I will certainly let you know if I can think of any ideas that might help.

      Please share any progress you make on this!

      Delete