Friday, March 16, 2018

PeopleTools 8.55+ Branding | Conditionally Display Header Icons

The PeopleTools New User Interface (NUI) and Branding has been available for a while and it should not be news to anyone that the system level header appears as shown below.


As we can see, the Branding header provides icons such as Home, Search, Notifications, Actions Menu and Navigator. This is a system wide setting controlled by the application branding configuration/setup. That means these icons will appear on any page/component we navigate to. For example:


What if we want to disable some or all of these icons at a component level?

There is a configuration in the Component - Fluid Properties - Header Toolbar Actions which allows us to disable some or all of these icons.


What if we want to programmatically/conditionally control the visibility of these header icons?

Someone asked me this question in one of posts here. I found that this is very much possible using the delivered (8.55+) PT_PAGE_UTILS API (App Package).

We can simply use the Banner App Class available in the PT_PAGE_UTILS App Package to control the visibility of the header icons in PeopleCode at the page/component level.

PeopleBooks Reference:
Fluid Page Utilities Classes
Banner Class

For example:


Results:


We can see that the 'Home' icon is disabled using PeopleCode on this particular page.

Similarly we can use the following Banner class methods to disable other Branding header icons:
SetVisibilityActionList
SetVisibilityAddto
SetVisibilityHelp
SetVisibilityMyPreferences
SetVisibilityNavbar
SetVisibilityNotifications
SetVisibilitySearch
SetVisibilitySignout

Further, some of these options (Search) are not available via Component - Fluid Properties.

PeopleCode for reference:

16 comments:

  1. This is great info! As an analyst supporting an upgrade to a Fluid environment, I've found lots of great information on your blog. This topic gets close to, but not quite exactly, the issue I'm trying to resolve. We are looking for methods to suppress various icons in the fluid header based on the type of user (for example, based on permission/role). It sounds like this code might work, but I'm not sure where to put it. Would love a handy blog on it :)

    ReplyDelete
    Replies
    1. Thank you for the comment. I appreciate it!

      You can do that at a higher level using configuration instead of PeopleCode. Take a look at this blog post.
      https://pe0ples0ft.blogspot.com/2016/08/peopletools-branding-role-based-themes.html

      Again, this may not be exactly what you need but you could improvise these two options (Role Based Themes and the API in the current blog post) and come up with a solution for your requirement.

      Hope this helps!

      Delete
    2. For using security to control access, I suggest reviewing this blog post as it lists several permission lists that control header features: http://peoplesoftih.blogspot.com/2016/11/things-learned-during-our-855-rollout.html.

      Delete
  2. How did you get the label Test Environment: HCM92023 to show? Or is that specific to the page you are on?

    ReplyDelete
    Replies
    1. I have a system wide javascript that I inject across the application. This shows up on all pages.
      https://pe0ples0ft.blogspot.com/2016/06/peopletools-855-using-oracle-jet-jquery.html

      Latest version of the javascript injection framework is available here:
      https://pe0ples0ft.blogspot.com/p/javascript-injection-framework.html

      Delete
  3. If you want information about What is cXML, how to integrate it with eCommerce
    What is cXML, how to integrate it with eCommerce

    ReplyDelete
  4. Hi All,

    The icons are freezing (not moving any page), after applying PT patch 8.55.25 on 8.55.13
    Please let me know anyone knows the resolution of this kind of issue.

    Thanks in advance.

    sdprasad307 at gmail
    Thanks&Regards,
    Durga Prasad

    ReplyDelete
    Replies
    1. Hi Durga Prasad, I have not run into this issue but I don't have access to a 8.55.25 environment. I will get back to you if I find a way to replicate your problem. Hopefully, others with the problem might be able to help.

      Also, it will be a good idea to post this on My Oracle Support Community as well are create a SR with Oracle.
      My Oracle Support Community Link: https://community.oracle.com/community/support/peoplesoft/peopletools_-_psft

      Delete
  5. I want to use the Save Button in toolbar action in my Fluid page to save the data. When I make a pushbutton as Toolbar Action in Destination and action type as Save, it is not working. Please let me know if there is another way to use that save button in Fluid page.

    ReplyDelete
    Replies
    1. When you say it is not working, is it not saving or are you getting an error?

      It should work if you use 'Toolbar Action' as the Destination and 'Save' as the Action Type.

      Take a look at PTGP_USER_PERS_FL (Page/Component) which the 'My Preferences' page. There is an example of a Save button in this page.

      Delete
  6. Hi Sasank, Is it possible to add a custom icon to fluid header? We have a requirement to add company logo before home button.

    ReplyDelete
    Replies
    1. Yes. This should be possible. You will need to look at customizing PT_HEADERPAGE page. The "Right Box" group box houses the system icons that are displayed in that area. You will need to find a way to display your icon using similar logic.

      Also, keep in mind that the Home icon and many others collapse into the Action Menu when we are on small form factor (SFF) devices. You might need to replicate a similar logic for SFF.

      Delete
  7. Thanks for your response and learning lots from the resourceful information you have posted!!

    ReplyDelete

  8. Thanks for your feedback and I am glad that you are able to configure the functionality.

    ReplyDelete
  9. Not able hide home button programmatically

    ReplyDelete