Monday, October 03, 2011

Accordion Navigation Collections

A few months ago we released a White paper about PeopleSoft Applications Portal and WorkCenter Pages that showed screen shots of an accordion menu. A lot of you asked how we created these pagelets. Tomorrow in our OOW session PeopleSoft Answers: How to Create a Great PeopleSoft UI, I will demonstrate creating the pagelet, but we won't have time to walk through the XSL -- the critical piece. For those of you that will be there (and those that won't but know how to use Pagelet Wizard), here is the XSL: accordion-nav-hosted.xsl.

Disclaimer: I make no warranty regarding the use of this XSL.

Security Warning: To make sure the XSL will work "out of the box," I pointed the JavaScript at Google's hosted JavaScript API's. Since this code is used on your enterprise home pages, I suggest you replace these references with references to your own site's versions of these libraries. The thought of allowing some external service to run code on my pages makes me a bit nervous.

I have to point out a minor difference between the output of this XSL and the output shown in the white paper: This XSL opens links in the current window or a new window. It does not use modal dialogs. Navigation Collection XML contains absolute PSP URL's, which don't display well in a modal dialog. The version shown in the White paper actually uses a custom transformer and some PeopleCode to convert psp URL's into psc URL's for dialogs.

Update March 5, 2012: Leandro, a reader of this blog, posted his derivative of this stylesheet. You can download it here. Leandro wants to make sure you know that it works on the single nav collection for which he tested, but other exceptions may arise. I looked through the XSL, and it looks good. Here is a list of the differences between Leandro's version and mine:

  • Updated the links to jQuery and jQuery UI (JS and CSS) to the latest versions.
  • Commented out the custom dialog framework code that would open jQuery UI dialog IFrames (because the code to make the iframe is not present in Jim's original).
  • Included the description of the top-level folders in the H3 tag's title attribute, so mouse-over of the accordion items will display the description of the menu. (This was already done by you for inner folders and shortcuts.)
  • The resulting accordion menu will be sorted as you would typically find in a PeopleSoft navigation collection: all folders before all shortcuts, and the "# more..." pseudofolder (if any) at the end.

147 comments:

Toby said...

Great work!
Any chance you could provide an example of your custom transformer.

Jim Marion said...

@Toby, thank you.

Yes, there is a great chance I will provide my example transform program. The transform uses the Meta-HTML app class from chapter 9 of my PeopleTools Tips and Techniques book. You don't have to wait for my post though. The transform is just a copy of the delivered XSL transform with a line added to perform the Meta-HTML transform.

Surinder Dhillon said...

Jim, thank you for the Accordian menu information. Now I am trying to get the image setup in a similar way that you had in the demo with the cycling of the various screens and the two right columns merged into one (visually anyhow).

Is that the same as the transform that was asked about in the previous post? Thx

Jim Marion said...

@Surinder, no, I haven't blogged about the jQuery Cycle plugin yet.

Surinder Dhillon said...

oh ok, so is the content for the jQuery Cycle image files that are being cycled thru or are you cycling App Designer objects? Just wondering if these are stored in the application or offline files.

Jim Marion said...

@Surinder, you can cycle just about anything. In my case, I'm cycling images from Enterprise (Applications) Portal's news publications. You could just as easily cycle App Designer image definitions, uploaded file attachments, etc.

Manoj said...

@Jim, thanks for the XSL, its very short and neat.

I noticed one difference though, with IE (used IE8), the accordion animation is a bit jerky. Just curious, was your demo on OOW had the same issues?

Jim Marion said...

@Manoj, I avoid IE 8 at all costs. I use Firefox and Chrome. The IE 8 and lower JavaScript engine and hardware acceleration is not as good.

I haven't used IE 9 so I can't comment on it.

Manoj said...

@Jim, Ah ok, I share the same emotions about IE. Unfortunately, most of our user base use IE.

Surinder Dhillon said...

Jim, really silly question, where did you get the icons on the accordian menu that you demoed at OpenWorld? Thx

Jim Marion said...

@Surinder, some of my nav collections use delivered images. The ones in the Employee Self Service menu came from a graphics artist we hired. You can find icon packs online (free or for purchase).

Don C said...

Jim -

Thanks for posting. Did you have any issues with this in Firefox? My accordion nav collection works fine in IE, but in FireFox 3.5.6, it works fine in the Pagelet wizard preview area, but not on the homepage. Just curious if you ran into anything similar.

Don

Jim Marion said...

@Don, I use Firefox 7 exclusively. I haven't tested on FF 3.5. I've had problems with Type Ahead on FF 7 and my PT version (PT 8.51.04), but from a UI perspective, I enjoy FF 7 so much more.

By the way, if it is working in Pagelet wizard and not on the homepage, it would be hard to blame the browser, because it is obviously working in the browser, just from a different location... but then there is the fact that it works on IE. If I were trying to troubleshoot this, I would open Firebug and see if the pagelet content exists if expected. I would also look for errors in the console when the page loads, and I would also put a breakpoint in the $(document).ready to make sure it is firing correctly.

Don C said...

@Jim - thanks for responding. I walked through in Firebug and see the Accordion get kicked off, but I never see the IsReady property get set to true. What's interesting is it works in the Pagelet Wizard preview (Step 5) when I first go in, but if I click Save, it stops working.

John said...

@Jim,

The accordian works great. I've used similar menu UI's and they are a great alternative to the delivered menu.

Is there any chance you can share a sample of the code for the news pagelet? It's hard to get a feel for the functionality without being able to see it in action. Thanks.

Giri said...

Hi Jim,

How do i use PNG images in PeopleSoft.

GIri

Jim Marion said...

@Giri, Even though App Designer only displays certain types of image formats, it allows you to import any type of image (including PNG images).

Jim Marion said...

@John, I posted the news publication XSL here.

Giri said...

Thanks Jim, I am able to use PNG image format. I have another issue with Jquery UI JS.

I am using your accordion xsl transform for navigation collection. When i use JS from Google site its working fine, but if i save them as js in my application getting issue as below.

No issue using Jquery , its with Jquery_ui.js

illegal character
[Break On This Error] var proto = $.ui[ module\u00c2\u00a0].prototype;

Giri said...

I got resolved by using Jquery Ui mini script.

Thanks Jim

Gratian Dicu said...

Wow... you've just opened a new chapter in PeopleTools for me, before PT i has working only on UI with jQuery and when started with PT i was really upset that i have to let down my jQuery experience ... but not anymore :) . Thanks for the great posts that you provide to the community.

Kevin Weaver said...

I have an interesting issue trying to add a link to a third party learning management system. In order to authenicate with the third party system we need to submit a form with the user's credentials. I have successfull built this html and my thought was to create a content reference to an iScript that would generate this html in a new window. When I click the link from the menu navigation it works like a champ. But when I click the link from a navigation collection it redirects the user to the third party system, but then I get "Cannot display the webpage" error. I don't know what is blocking the content, but I figrued out that if I remove the Query String parameter "&FolderPath=PORTAL_ROOT_OBJECT.PORTAL_BASE_DATA.CO_NAVIGATION_COLLECTIONS.ADMN_HCM_SELF_SERVICE.ADMN_F201009281606311334178602.ADMN_S201009281800152410893017" from the url in the navigation collection it works. How can I remove this parameter from the navigation collection? Any thoughts?

Jim Marion said...

@Kevin,

First, I recommend using Fiddler to see the HTTP requests sent by the nav collection, and then to see the iScript redirects as well. If I understand correctly, the nav collection item should point to the iScript, and the iScript should send down an HTML form with JavaScript to post the form to the third party system.

Can you tell which part is failing? Is PeopleSoft failing to send back the iScript contents? Your iScript should be able to ignore the additional query string parameters, and your form post should not include them unless you specifically tell it to include them.

The navigation collection shouldn't send a request directly to the third party system unless you configure an external CREF that points at the external system. If this is the case, then, yes, PeopleSoft will send all those extra URL parameters to the external system. It doesn't sound like you want an external URL though, it sounds like you want an iScript URL that posts to the external system.

Kevin Weaver said...

Thanks Jim. I download fidder and it is pretty cool. I am glad I finally followed your recommendation. What I discovered is that I get to the third party website from the iScript. But from there it makes some calls that get a 304. So it is erroring on the third party site.

However, if I remove the folderpath query string parmeter from the oringinal request to the query string it works. I am not passing querystring from the iScript to the form post? So I don't know why it matters. Do you know any magic in the content reference to remove the query string from the navigation collection or how to get around this 304?

Thanks!

Kevin Weaver

Jim Marion said...

@Kevin, no, I do not know of any way to remove the additional query string parameters sent to an iScript from a nav collection. It seems really odd that it would act this way. Your iScript can ignore the parameters with no issue, and the third party should not have any knowledge of them. Very strange.

You can try changing the iScript CREF to either a generic PeopleSoft URL or an external URL and see if that removes the additional parameters. I can't imagine that PeopleSoft would send that extra info to a non-PeopleSoft site.

Kevin Weaver said...

Thanks Jim, changing it to an non-peoplesoft url fixed the issue. However, now I am having to place the whole url into the portal url. Will I need to modify this in every environment to point to the local environment's url. Example in Development this is my url:

http://capp111c.umb.com:11100/psc/pa91dev/EMPLOYEE/EMPL/s/WEBLIB_ZZ_EDCOM.ISCRIPT1.FieldFormula.IScript_EDCOMMXFER

In production it would be:

http://psportal.intranet.umb.com/psc/paprd/EMPLOYEE/EMPL/s/WEBLIB_ZZ_EDCOM.ISCRIPT1.FieldFormula.IScript_EDCOMMXFER

Or should we just manually maintain this. Thanks again for your help!

Kevin

Jim Marion said...

@Kevin, I had the same thought when I gave the response. The answer is no, you can set it in one place, not each one. Even though it is a non-PeopleSoft URL, you can still use a node definition. Whenever you have a server definition with a few different URL's, create a node for that server. In the portal tab for the node, set the base URL for the portal and content URL's, and then use that node in your CREF's. For the URL portion of the CREF, use whatever comes after the base part of the URL.

Since this is already a PeopleSoft node (portal would be EMPL) you should already have that node defined, and you can just use whatever comes after the base portion of the URL from the node defintion. Then you don't have to update anything when migrating.

Kevin Weaver said...

Thanks Jim,

Everything is working and this is going to make our business partner very happy.

It is funny how something that seemed so simple took so much time!

Kevin

Jim Marion said...

@Kevin: 80/20, 90/10 Seems like it always that last little thing that takes forever.

John said...

Hi Jim,

Is there any reason this XSL would not work outside of Enterprise Portal? I have tried using it directly in PeopleSoft HR 9.1/8.52 and the accordion doesn't seem to work. Using the exact same XSL in Portal 8.9/8.49 works as expected. Just wondering if you would expect this to be the case or if I'm missing something obvious. Thanks.

Jim Marion said...

@John, I'm glad to hear you had success in a portal environment. However, I do expect it to work the same regardless.

I'm sure you've already tried a number of ways to debug this, but here is what I would do:

1. Compare the XML between portal and HR. You can find the XML in the upper box of pagelet wizard on step 5. If the tags and shape match, then the XML isn't the issue.

2. Check to make sure the JavaScript, CSS, etc is getting loaded into your page. You can see this in firebug in the scripts or CSS tabs, just use the drop-down.

3. Check the selector used to start the accordion. This is in the $(document).ready. Look at the code generated by looking at the contents through Firebug, and then paste that $("...") stuff into Firebug (the part right before .accordion) and see if it selects anything.

4. See if accordion is loaded by typing $.fn.accordion into Firebug. You should see function() as the result.

Giri said...

I have used this in 8.51 and its working fine. When i open a link its opening in target window. but for the same in 8.52 the link is opening in new window.

I am using work center and navigation collection.

Jim Marion said...

@Giri, use Firebug or IE Developer tools or Chrome tools to check the link's target attribute. Also, check your nav collection "Open in New Window" checkbox.

Leandro said...

Jim, great stuff! A question about the JS libraries: if I want to have two navigation collection pagelets formatted this way, would there be any issue if the JQuery and JQueryUI JavaScript libraries were referenced multiple times in the page?

Jim Marion said...

@Leandro, good question. Yes, all will work, but performance could be better. JavaScript libraries are large. Each instance requires reparsing. Each instance will recreate all of the jQuery and jQuery UI objects. Obviously, this is not efficient. JavaScript libraries are written with web apps in mind, not portals. Portals are collections of related, but unknown objects. One object can't depend on the next, so each needs to contain all of its dependencies. Here is how I handle this: C-style include protection. I wrap the jQuery and jQuery UI libraries in an if test. Here is the jQuery version:

if(!window.jQuery) {
// minified jQuery contents goes here
// end jQuery contents
}

The jQuery UI version is very similar, but tests for the existence of a jQuery UI object.

This requires you to have a copy of the jQuery libraries on your server so you can modify them rather than accessing them from the Google API site.

My favorite approach is to use one of the "require" style methods of JavaScript inclusion so the file isn't even accessed if it isn't needed, but this if(...) test is the easiest way I've found to ensure you only have jQuery once.

Subhankar Sett said...

This is fascinating! I have been fiddling with this ever since I got to read this post. While doing so, I found this situation, for which I had been trying to find an explanation for a very long time.

What I did was create a Navigation Collection with 3+ levels. By that, I mean, I had created a folder containing a folder, which is in turn containing a folder which had the link. It was like:

Folder 1 (navigation collection label)
|---Folder 1.1
   |---Folder 1.1.1
      |---Email Addresses

Now when I looked at the XML that was generated on the 5th page of Pagelet Wizard, I saw that there were only 2 levels under the tab. So, using the generated XML I am unable to find a path of the Email Addresses link.

I just wish the XML had the following structure for the above Navigation Collection. This can help me parse through the entire Navigation Collection and apply necessary transformations.

(Contents)
  (NavItem Label="Folder 1.1" Type="Folder" ... )
    (NavItem Label="Folder 1.1.1" Type="Folder" ... )
      (NavItem AbsolutePortalURL="..." Type="Shortcut" Label="Email Addresses" /)
    (/NavItem)
  (/NavItem)
(/Contents)

Do you have any solution for this?

Leandro said...

Jim, what does the following JavaScript do in your XSLT?

$("#<xsl:value-of select="$selector"/> .jjm-showas-dialog-iframe").click(function(event) {
event.preventDefault();
var $this = $(this);
var url = $this.attr("href");
var title = $this.attr("title");
jjm.dialogs.showIFrame(url, {title: title});
});

Jim Marion said...

@Leandro, that is a very good question. That JavaScript calls my custom wrapper around the jQuery UI dialogs to open a PeopleSoft component in an iFrame dialog rather than navigating directly to that page. It appears that I didn't post my dialog wrapper with this example. I'll have to update this post with that wrapper JavaScript.

Jim Marion said...

@Subhankar, In your example, you have 3 levels, but only one user defined folder at the first level. Is that the case? Do you have a 2.1 and 2.1.1? I was discussing this with development this week as well. If you only have a 1.1, then the 1.1 won't appear, it will skip right to 1.1.1. I don't agree with this, but it is by design. If you have a 2.1, then the 1.1 will appear. If this does not describe your case, then I strongly recommend you log a bug. If you, like me, disagree with the approach of ignoring 1.1 when there is no 2.1, then I recommend you log an enhancement request.

Leandro said...

Jim, I've made some enhancements to your XSLT that could prove helpful to others, and would like to share them to contribute to this fine effort of yours.

Basically, it has to do with ordering of sections and items within the sections so that it more closely mimics the standard PeopleSoft menu ordering (all folders before all shortcuts, "# more..." pseudo-folder at the end).

If you're interested, how can I send you the updated version?

Jim Marion said...

@Leandro, that would be great. Can you create a box.com, dropbox.com, or filesanywhere account and post the link to your shared file here? It doesn't have to be one of those three. Any file sharing site will work.

Leandro said...

Jim, here it is: accordion-nav-v2.xsl.

Here are the differences from your original version:
- I've updated the links to jQuery and jQuery UI (JS and CSS) to the latest versions.
- I've slightly modified the CSS selectors by using the ">" operator to indicate parent-child chaining.
- I've commented out the custom code you mentioned that would open jQuery UI dialog IFrames.
- I've included the description of the top-level folders in the H3 tag's title attribute, so mouse-over of the accordion items will display the description of the menu. (This was already done by you for inner folders and shortcuts.)
- The resulting accordion menu will be sorted as you would typically find in a PeopleSoft navigation collection: all folders before all shortcuts, and the "# more..." pseudofolder (if any) at the end.

Please note that this works on the single nav collection on which I've been testing it, but I don't know if any exceptions may arise on others. Furthermore, I'm new to XSLT, so perhaps some of the stuff I did could be better done otherwise.

Jim Marion said...

@Leandro, thank you. Your changes make a lot of sense. I believe I actually had > in my selectors, but I have to support IE 8 in quirks mode, and IE 8 in quirks mode ignores them

Leandro said...

In that case, it makes sense to get rid of the ">" operators (I've been testing only on Firefox so far).

Jim Marion said...

@Leandro, if they are doing something, then it makes sense to keep them there. Likewise, if they add clarity, then keep them as well. IE 8 will treat the selector as if the >'s weren't there, so it isn't hurt by the inclusion of them.

Leandro said...

Jim, after testing in MSIE 8, the ">" operators do in fact cause display issues. I have uploaded the corrected version to accordion-nav-v3.xsl. This will work in MSIE 8 and in Firefox.

Jim Marion said...

@Leandro, good to know. Thank you for the update.

muthu kumar said...

hi jim,
i'm trying to implement Accordion Style Pagelet. for that do i have to make any change to the xsl given in appendix A in branding red paper apart from the updating the jquery,stylesheet file names.

Jim Marion said...

@Muthu, you should not have to make changes. The XSL in this blog is an alternative to the one in the red paper.

Pawan Mundhra said...

Hi Jim,

While implementing the accordion found couple of issues on this.
The accordion is jerky on IE but this is workig in all other browser(chrome and FF). Links are leaving the current work-center and opening the page i.e in psc (issue in Tool 8.52 and working good in 8.51).

I have worked with some part of this XSL and modified the xsl to work for peopletools 8.52. But the jerk issue still exist.

I found that for IE we need to include <!DOCTYPE html> in the xsl. I tried with the
"<xsl:stylesheet version="1.0" xmlns:xsl="href="http://www.w3.org/1999/XSL/Transform"">http://www.w3.org/1999/XSL/Transform">" but no luck.

Here is the updated xsl https://www.box.com/AccordionBlue . If you have any solution to remove jerk in IE then this will be great.

I have included all jquery files at PTAL_PAGE app package so XSL can access.

Manohar Penikelapati said...

Jim,
Your blogs are of great help for many of my technical issues. Thank you.
I implemented accordion in PT8.48 version using jQuery. On tools 8.51, the accordion works just once if that is the first one to click. Any action on the page that makes a server trip breaks accordion.
Any assistance will be of great help.

Thanks
Manohar

Jim Marion said...

@Manohar, thank you for the compliments. I am glad to assist.

Are you using the accordion in a component page or a home page? On a homepage or in a workcenter, it will work without issue. In a component page, yes, it can behave differently. This is based on the way the 8.51 Ajax behaves. It may be re-initializing jQuery, etc.

Manohar Penikelapati said...

The jquery is on a component page. Accordion javascript code is on $document.ready(). How do I ensure jquery is active even after partial page refreshes.

Jim Marion said...

@Manohar, On a component, $(document).ready fires when the page loads, as you would expect, but it doesn't fire every time a change happens. I have two suggestions and I'm not sure either will work... actually, the second will, but may require trial and error to get right.

#1 I suspect the reparsing of your accordion has something to do with the accordion's HTML area on the page that is getting reloaded on FieldChange or any other partial page render event. You don't necessarily need a dom ready event to script dom elements. You just need the elements you will script to be ready. An alternative to $(document).ready is to place your script inline (preferably in a self executing JavaScript function to avoid namespace pollution) some place after the elements you intend to interact with. This ensures that the HTML elements you intend to interact with are loaded and ready.

#2 Monkey Patch net.ContentLoader (or net2.ContentLoader, depending on tools release). You can find an example of Monkey Patching net.ContentLoader in my post Monkey Patching PeopleSoft.

Manohar Penikelapati said...

I was using .click() function of jQuery for the accordion. When I replace --
$('#ELEMENT_ID').click(function (e) {
with $('#ELEMENT_ID').on("click",(function (e) { , the accordion started working.

Using .live() function also worked in jQuery 1.3.x library.

The .on() function is part of jQuery 1.7+

Jim Marion said...

@Manohar Makes sense. Good to know. Thanks for sharing!

flyboy said...

Hi jim,

I am trying to get the modal popup window to work from fancybox on an accordion style nav collection. Can you help on this? I have downloaded the fancybox js and css onto my webserver and placed the javascript in the xsl within the pagelet on step 5, but it acts like it's not calling the java.

thanks.

Jim Marion said...

@flyboy, how are you attaching fancybox to the links/click event?

Devi said...

Jim,
Thank you for this post. I used your blog and Oracle's white paper to build a pagelet using accordion style of navigation. I placed it in Homepage. Question - Is there a way to make this pagelet appear on the left side as part of the navigation area? Currently, when the user clicks on the link the target page does not show the accordion style pagelet. They would like to see that in the left side of the navigation. Thanks for your time.
Devi

Jim Marion said...

@Devi, if you have PeopleTools 8.51 or later you can use a WorkCenter with an accordion navigation pagelet. For your WorkCenter version, set each link's target to TargetContent. We do this quite often.

Devi said...

Awesome! That worked. I have tried WorkCenter before but never thought of trying it out this way. Thank you so much.
Devi

Devi said...

Thanks Jim. That addressed my need. I am not clear though about - setting each link's target to targetcontent. Where is this done? I think it could be the reason as to why when I click on a link in WorkCenter pagelet, the CREF takes me to a page without any accordion navigation. I do have wokcenter configured for all the CREFs that are referenced in the accordion pagelet. I am definitely missing something.

Jim Marion said...

@Devi, it is one of my favorite use cases. The typical/legacy Enterprise system interaction involves navigating to a component, searching for a transaction instance, and then acting upon that instance. Adding an accordion to the WorkCenter simplifies the "navigate" phase because it limits the navigation options to just those related to the business process associated with the WorkCenter.

Jim Marion said...

@Devi, I have two XSL templates and two pagelets. One is for homepages, and the other is for WorkCenters.

In the homepage XSL there is a template named resolveTarget that has two results: _blank or _top. The WorkCenter version is the same, but I replaced _top with TargetContent.

I've looked through the newer pagelets delivered by apps and I see that there is code to allow you to use one template, but I haven't taken the time to merge my templates.

Devi said...

Thank you! It worked! Thanks again for your quick response. Users will like this.
Devi

Devi said...

Jim,
Thank you for helping me out with the workcenter issue. I did tell the folks at my work about how much your session and your blog is of great help. Manager for Campus Solutions team from my work (Princeton University) would like to reach out to you at the Alliance Conference. She would like to get some expert opinion on a new student application that they are planning to develop. I see that you have a Mar 18 4.30-5.30PM session. She would like to meet you after the session. Is that ok?
Thanks,
Devi

Jim Marion said...

@Devi, yes, that would be fine.

New_to_Portal said...

Jim, we are implementing PeopleTools 8.52 and I had to pull out some customizations that were interfering with the Pagelets and Links. I have no experience in Portal and took over this when the previous developer left. At current I am trying to resolve and issue with a lot of white space when the accordion is expanded as well as a difference between Chrome and IE. Looking through the posts I see that you do not use IE, but wonder if you know of any additional changes that need to be made in the XSL. Using jquery 1.9.1 and jqueryui 1.10.1. Thx

Jim Marion said...

@New_to_Portal, it is true that I am not fond of IE 8 or earlier. I don't have much experience with IE 10. I did install it though :)

I am currently using jQuery 1.8 because it contains a lot of deprecated features that 1.9 eliminated. Have you tried jQuery 1.8?

Sachin Y said...

Hi Jim,
I attended your presentation in Alliance conference- 2013. I ave been trying to create accordion menu in out pTools 8.51. Can you advise what do I need to do next (i'm new jQuery and only know PeopleTools but Im learning this - can you point me in the right direction).
1. I created a navigation collection with the CRefs I want.
2. I used a pagelet wizard to create a pagelet from this Navigation Collection.

Can you please advise what do I need to do next to convert this pagelet in an accordiion menu.

Thanks in advance.
Sachin

Jim Marion said...

@Sachin, I hope you had a good conference. I am at the airport on my way home now. Please take a look at this OTN forum discussion thread and let me know if you still have questions after reading the comments.

Sachin Y said...

Hi Jim,
First heartfelt thanks for responding my mail, I know you are travelling so your time is much much appreciated.

I went through the OTN thread and did do all the steps. All the steps complete successfully. This includes:
a. Creating collection Navigation.
b. Created a pagelet in pagelet wizard with a data type of Navigation Collection.
c. Walked through the wizard to step 4. In step 4 I chose "Custom"
5. Pasted the XSL from the blog post, the updated one (accordion-nav-v3.xsl)into the xsl section, in step 5 of pagelet wizard.

After I paste and tab out from xsl field, following things happen:
a. In step 5, where I see the pagelet (for nav collection)- I see that pagelet changes from PS default pagelet to a pagelet which looks quite like default peoplesoft pagelet with following differences
i.) It has no background color (white)
ii.) I see folder icon next to "My Time" and "My Personal Information"
iii.) I see all the folders expanded.

It does not look like accordion menu, no animation - everything is static. Do you know what can I be missing ? Thanks in advance for your help.

Thanks again for your help,
Sachin

Jim Marion said...

@Sachin, yes, I think I know what you are seeing. The structure of the nav collection changes to match the structure defined by the XSL, but the JavaScript and CSS didn't apply, so you are not seeing it as it should be seen. I have seen this before. When this happens, I use Firebug to troubleshoot. What you are looking for in Firebug is an error message in the JavaScript console or red items in the network pane that identify files that failed to download.

Another thing I've seen happen is when loading over the network, the pagelet wizard just doesn't update fast enough. To test this, switch to step 6 and then back again and see if it formatted your pagelet. If so, then everything is just fine and when you view it on a homepage or workcenter, it will work just fine. Please note that I have never seen this behavior with locally hosted jQuery, only with remotely hosted jQuery (CDN).

Jag said...

I have a question , I have created workcenter /using Navigation collection. What I am finding is that the search record key in my case EMPLID is not being passed when moving from one link to another in the collection. How can this be done so that the search record would populate the keys from prior link.

Jim Marion said...

@Jag, I like what you are trying to accomplish. Unfortunately, there is no easy way to make that happen. The navigation collection is completely independent of the content displayed in the target area.

galaxian said...

Jim, just found your terrific site!! I have a question. I created a work center and am using pagelets based on a navigation collection. The issue i am having is when i click the link it opens the link NOT in the Target area. I have checked and double checked that the open in new window box is NOT checked but still cannot get it to work properly.

Jim Marion said...

@galaxian, what you are seeing is correct. The template I published was designed for just the homepage. I left out all of the stuff for Workcenters, etc for simplicity. If you look at one of the delivered nav collection XSL templates, you will see that it makes reference to PTAL information in the XML. This is how the delivered templates differentiate between the display locations. I have been told that the Navigation Collection data type determines its display location and specifically sets the URL to be the /psc/ URL, but I haven't tested it. This is necessary to just load the content into the TargetContent area of the Workcenter.

Jim Marion said...

@Akhilesh, I didn't post your comment because it had your e-mail address. I didn't want you to receive unwanted spam.

To create accordion pagelets, start by creating a navigation collection that contains a series of folders and links. You may have multiple folders, but only one level of folders, and only at the root of the nav collection. Links must be in folders, not at the root.

Create a new pagelet wizard pagelet and choose your navigation collection as the data type. In step 4, choose custom. Look through the comments here and find the latest version of the Accordion Navigation Collection XSL. Paste it into step 5 of the pagelet wizard. Publish in step 6. Let me know if you have further questions.

Akhilesh Kumar Singh said...

Hi Jim,
Thank you for your reply but still i am getting error i am sharing steps which i have followed :
Step 1.
i have created following Navigation Collections

- Root Folder
- Folder 1.1
--Link 1.1.1
--Link 1.1.2
-Folder 2.1
--Link 2.1.1
--Link 2.1.2

Setp 2.
Pagelet Wizard

Data Type : Navigation Collection

at Step 4 i have selected Display format as custom

in step 5 paste XSL "accordion-nav-v3" i am getting error which i mention below.


Error which Popup :

"
An error has occurred while trying to perform the XSL transformation. This is because either (1) the DataSource did not return valid XML or (2) the XSL for transformation is invalid. Correct the problem before continuing. If you continue to have trouble, contact your system administrator. This problem was detected by Pagelet Wizard.
"


Please help me out to know where i am making mistake.

Jim Marion said...

@Akhilesh, that is great progress. Pagelet Wizard doesn't give you enough error details. What I usually do is copy the XML and XSL into separate files and then run a local transform using a local copy of the Xalan XSLT processor. I suspect there are online transformers as well. This will give you the line #, etc for the error.

Akhilesh Kumar Singh said...

Hi Jim,

i have copied both section XML & XSL in two different file with .xml & .xsl format and after clicking to the file, XLS file giving error.

"The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'file:///C:/Documents and Settings/Administrator/Deskto...


"
Please help me is the way to check or any other procedure to validate .
Thank you.

Jim Marion said...

@Akhilesh, Yes, I would suspect the XSL. I only validated the XSL I posted. The others were created by knowledgeable contributors in the comments. My XSL referenced a JavaScript dialog library that doesn't exist, that is why I suggested you try one of the other XSL files. Leandro's version should be good.

Did you try running the transform locally with Xalan or another good XSLT processor? These command line tools show the line number and character that caused the error. A web browser isn't a very good tool for that. I've been told that there are some good online transformers that show errors, but I haven't found one. I do like XSLT Cake, but I can't get it to show errors.

Akhilesh Kumar Singh said...

Hi Jim,
As you have suggested i have tried leandro XSL "accordion-nav-v2.xsl /accordion-nav-v3.xsl" but again i am getting same error.
I have used the tool Xslt Cake to test XML / XSL but i am not getting any output after pressing run button.

As you know i am new and not have a clear idea which tool is good to validate XLS/XML. if you have any document for Accordion Navigation Collection if possible please share with me.
Please help me out.
Thanks.

Jim Marion said...

@Akhilesh, I did not get any errors from accordion-nav-v3.xsl. Did you click the download button after opening the link? Does the file you downloaded start with ?xml version="1.0"?

Akhilesh Kumar Singh said...

Hi Jim,

Now i am able to see the animated accordion menu.
Thank you very much for your support and guidance.


Thank You.

Akhilesh Kumar Singh said...

Hi Jim,

I am trying to create slide show pagelets, after reading of Branding_Red_Paper i am not finding the navigation for "Browse Section Articles" from where i can add banner images.

Please share the steps which need to be followed to implement slide show pagelets.

Thank You.

Jim Marion said...

@Akhilesh, The navigation is Content Management > News Publications > Browse Publications. Please note: news publications are not part of the PIH restricted use license with PeopleTools and require a full Enterprise Portal/PeopleSoft Interaction Hub license. If you satisfy that license requirement, then you can find the XSL for the slideshow on my slideshow blog post.

Akhilesh Kumar Singh said...

Hi Jim,
After completion of news publications.I have paste the slideshow XSL & i am not able to see any output in pagelet preview, in case of generating default XSL it's shows news feed.

Please help me to resolve slide show.

Thank You.

Jim Marion said...

@Akhilesh, I am going to answer you on the slideshow blog post since it is more relevant to that post.

Jim Marion said...

@Akhilesh Thread continued here

Brent Sanford said...

Have you seen any issues with 8.53? I've used in 8.51/8.52, but I'm having issues in 8.53. It renders similar to a normal navigation, but messy.

Using Firebug, it looks like it's loading the scripts. In 8.52, it loads jQuery v1.6.1 and accordion v1.8.4. In 8.53, it loads jQuery v1.7.1 and accordion v1.8.14.

Thanks.

Jim Marion said...

@Brent, no. I have seen no differences between tools releases when loading JavaScript files from the web server or from a CDN (iScripts are a different story). The version of jQuery is controlled by you, so you should not see version differences unless you intentionally changed versions. If you are not seeing the accordion behavior, then you might check to see if multiple versions of jQuery are loading. This could be resetting your loaded plugins (jQuery UI).

Does it behave differently on a homepage than it does in the Pagelet Wizard? Did you try loading the pagelet through just the pagelet wizard iScript URL? These are tricks I use to debug pagelets.

Brent Sanford said...

I did notice why I had different versions. I got them both to the same version, but nothing changed, trying both versions.

It does behave the same on the homepage, iScript URL, and the pagelet wizard.

Jim Marion said...

@Brent, that is really odd. Check your $(document).ready event handler within the XSL to make sure it is firing. I would use Firebug and console.log(...) to print stuff to the Firebug console from the $(document) method. Specifically, I would be checking:

1. That the .ready handler is triggered

2. That the accordion selector finds an element

3. That the .accordion method exists (jQuery UI loads).

You know, another requirement is the jQuery UI CSS. Is that still loading OK?

Jeff said...

We are in the process of building a navigation collection / menu much like the accordion menu you describe here, but the users want the menu to be expanded for all the areas.

We built the navigation collections and work center links. Used pagelet wizard and in step 5 selected the “Small Images” XSL template. We modifying the XSL to use target=TargetContent
The XSL does not use and JQuery commands.

The Navigation Collection displays correctly but when a link is selected the user is transferred to a new page that displays the Work Center as the menu as if target=_blank
From the Work Center menu if a link is selected the user is transferred to the page but with its content being displayed in the entire page as if the target=_top

This is my first time using the PS Navigation Collections and Work Center and coding XSL.

Thank you for any help.

Jim Marion said...

@Jeff, it sounds like you did everything correctly. TargetContent is the transaction space in a WorkCenter. When you click a link, and it opens a new window, if you alt-tab back and click another link, does it open that other link in the same new window or does it open yet another window so that you have 3 windows? If it opens in the same new window so that you only have 2 windows, then it means the target attribute is working, but something is wrong because the transaction frame does not have the same name as the link target.If this is the case, then use Firebug or Chrome or IE tools to identify the iframe name. If you end up with 3 windows, then, yes, it is acting like target="_blank"

Rebecca Paulson said...

Jim,

When running the accordion-nav-v3 using the Google APIs, everything works with the exception of a security error. However, when we attempt to reference CS & JS files stored on our local web server we get endless problems with 404 errors (etc).

How do you reference the local web server files?

Our file path is as follows:
/u01/app/psft/853/cnv/por/webserv/lvcsscnv/jquery/

Thanks,

Becca

Jim Marion said...

@Becca, are you using the correct protocol for the Google hosted version (http or https)? No matter. I prefer local hosting anyway. It looks like you need to move your jQuery folder down a few more folders into the web server's root directory: /u01/app/psft/853/cnv/por/webserv/lvcsscnv/applications/peoplesoft/PORTAL.war/jquery/. The PORTAL.war directory should be the root of your web server so when you hit http://my.peoplesoft.server/jquery, it is grabbing the file from the PORTAL.war.

If that doesn't work out for you, I have a TON of other ways to serve jQuery without customizing the web server root (which will be overwritten if you have to regenerate PIA).

Rebecca Paulson said...

Jim,

Wow with the protocol call. That was a real palm-face moment...

I don't have access to the servers, but after having my request pushed through to move the files to the location you suggested I started getting some wonky stuff. When I reference the files (any/all of them) nothing works. When I look at Firebug and Chrome Developer tools, the errors are weird (i.e. Resource interpreted as Stylesheet but transferred with MIME type text/html). When I dig into the HTML (or the File Preview for the referenced files in Chrome), it looks like PeopleSoft is returning the HTML for the page calling the files rather than the CSS/JS file contents (which explains the example error above).

Any ideas why PeopleSoft would do something like this?

Thanks again,

Becca

Jim Marion said...

@Becca, if your files exist on the web server and are now addressable by URL, the first thing I would do is attempt to access them directly through the URL. This is purely Weblogic (or websphere) at this point and has nothing to do with PeopleSoft. If you are getting results, then you are ready to incorporate the files into your pages. If you are not getting results, then you will need to work with the person responsible for moving the files to make sure you have the correct URL.

If straight access works fine, but it doesn't work when you add the script or link tag to your PeopleSoft page/pagelet, etc, then the next thing to look at is your script's URL. Is it absolute? Is it relative? Is it relative but from the root of the web server (preferred)? If you didn't include the leading "/" in your relative URL, then it may be thinking that the script is in the "current" directory of the request, which is really a PeopleSoft URI that has nothing to do with the real file system.

I would need to see the URL's that are getting generated and the location of the files to know for sure.

About the CDN and protocol problem, have you tried protocol relative URL's? You leave out the http: or https: and just start with //.

Devi said...

Jim,

We just rolled out our first set of user experience changes and the users love it. Thanks for your article. It was the starting point.

I looking at taking this to the next level - to display peoplesoft pages in an iFrame dialog. PeopleSoft red paper for User Experience has a note regarding this but restricts it to only iScript based homepage pagelet links. I see a piece of code in your xsl to display pages in an iframe. It looks like you have a custom javascript function. Can you sharesome info regarding your javascript function?

$("# .jjm-showas-dialog-iframe").click(function(event) {
event.preventDefault();
var $this = $(this);
var url = $this.attr("href");
var title = $this.attr("title");
jjm.dialogs.showIFrame(url, {title: title});
});

Thanks,
Devi

Jeff said...

Jim,

Thank you for your help with my previous problem. I was able to get things to work. I have now run into another issue.

I have created a component based homepage pagelet and a navigation collection to create a better user interface. That all seems to work fine, but I also need to have a WorkCenter object point to the same menu/component object as the homepage pagelet.

When I navigate to "Manage WorkCenter Pages" and click "Create new WorkCenter page" I cannot Select the "WorkCenter Starting Page" because there is no "Portal Objects" folder under the "Root" folder.
I also cannot create another content reference for the same menu and component used on the original object. Is there a way to do this without having to put the same component on a different menu?

I'm hope I am clear with my explanation of what I am trying to do?

Thanks.

Jim Marion said...

@Jeff, I think I understand. You have a component that is registered as a pagelet. You also want to navigate to that component so you can use it as the starting page for a WorkCenter. I have 3 options for you:

1. Create a WorkCenter dashboard and place your pagelets on that dashboard. This is new in 8.53.

2. Create a CREF link to your pagelet and place the link somewhere else in the menu. In the CREF link, change the template to PTAL_APP_LANDING_PAGE. You now have a WorkCenter.

3. Create a new CREF with the same menu, market, and component. To avoid the duplicate error, add 1=1 to the additional parameters of the CREF. While you are there, you might as well change the template to PTAL_APP_LANDING_PAGE. Again, you now have a WorkCenter.

Jim Marion said...

@Devi, I will add a blog post with my dialog JavaScript.

Rebecca Paulson said...

Jeff,

Thanks for all of your tips, we've finally got this bad boy working in both Portal and CSS :)

We had our server admin remove all references to the files and them upload fresh jQuery files with the version numbers removed. Once he did that and bounced/refreshed the server cache everything referenced like it should.

YAY!! Thanks!

Becca

Shreyas Bhatawadekar said...

Hi Jim

I am working on a component based pagelet development. I have created two dynamic views(with the use of %OperatorId), two pages which have 1 grid each, having one dynamic record as Main record each. Both the pages have only level 1. Both the pages are included in the component. I have registered the component Then created a content reference with use as Pagelet having url as Peoplesoft Component and assigned security as well. Pagelet is displayed on home page, with 2 tabs. But the problem is that when I click on the other tab, then the transfer to the component takes place.

For example, the home page URL is http://pqrst.xyz.com:8020/psp/ELMDEV03/EMPLOYEE/EL M/h/?tab=DEFAULT
But when I click on another tab of the pagelet, it takes me to the component
http://pqrst.xyz.com:8020/psp/ELMDEV03_1/EMPLOYEE/ ELM/c/XYZ_CUSTOM_MNU.XYZ_WEB_TRN_HPVW.GBL

What my requirement is that whenever I click on tabs the home page along with other pagelets remains in focus.

I will greatly appreciate any help you can provide.

-Shreyas

Jim Marion said...

@Shreyas, what you are seeing is standard behavior. When you click a component tab, it sends a request to the component processor, which thinks it is running as a component, not as a pagelet. You will need to use a different mechanism, such as jQuery UI tabs, JavaScript, etc to change the display.

Simon Chiu said...

Greetings Jim,

We are trying to take advantage of Ptools 8.53.6, on both our Interaction Hub 9.1 R2 and Financial Services 9.2 Server.

I have been using the VP1 account to add "Remote Menu Item" via the Add Link section in Navigation Collections from the Hub to FS. Everything has been working fine, however now that we are testing actual user accounts, the links are no longer appearing within the Navigation Collection Pagelet. They do appear via Unified Navigation in the Main Menu (for example the Submit Expense Report Self Service Link in FS).

Is this unexpected behavior? We have tried associating number of permission lists and roles in the portal to the account (PAPP0000, PAPP_USER, Peoplesoft User) to no avail. I am wondering if we should take a second look at our node configurations, or perhaps there are specific delivered roles we need to consider.

Thank you so much for your time ~ again this resource has proven invaluable for adopters of this system!

Jim Marion said...

@Simon, this is NOT expected behavior. It sounds like something is broken in your system. If you can see the menu items in remote unified nav, then you should see them in the nav collection as well. The steps you described sound correct. You don't need to add the permission lists to portal. The remote navigation (navigation collections and remote unified nav) delegate security to the content provider app. You may need to file a support ticket for this.

Simon Chiu said...

thanks Jim... I just got it figured out. On the Finance Server, I added the "Peoplesoft User" role to the account we are testing, and now it's working in the Hub. I'll have to chat with our security guy: it looks like he has paired the permissions down too much!

FYI, and thanks Jim. It is strange the main menu was working. Hope this can help someone else in the future!

Stephen Shaw said...

Hi Jim
i am trying to extend the menu so that it includes contextual information within the menu itself

- Root Folder
- Folder 1.1
-- Folder 1.1.1
--- Link 1.1.1.1 (key 1)
--- Link 1.1.1.2 (key 2)
-Folder 2.1
--Link 2.1.1
--Link 2.1.2

Real life example
- root folder
- Personal information
-- Adresses
--- Home
--- Mailing
-- Dependant information
--- John
--- Jane
Etc

I can create the menu driven navigation using the navigation collections and I can create data driven navigation using the  pagelet wizard with a query data source but struggling to combine the two. I tried adding the query pagelet template to the nav collection but not working as it show as a a link

Any ideas?

Jim Marion said...

@Stephen, as you probably noticed, you can only have one data type. Your Pagelet is either based on a nav collection or a query, but not both. Since your Pagelet is data driven, I think a query makes sense. Your comment is on the Accordion Nav post, so I assume this is in reference to the accordion nav, but your structure is too deep (unless you have nested accordions). If it is, then you can use the accordion with a query, you just need to change the template. If your question is not related to the accordion nav, but just about queries and navigation collections, I think the way I would approach this is to use data in a query like you did, and then add links to CREF's using PSREGISTEREDLINK. Another alternative is to join to the portal registry tables in your query to get additional URL-like fields (or portal registry PORTAL_NAME and PORTAL_OBJNAME) to build PSREGISTEREDLINK URL's. If using PSREGISTEREDLINK, be sure to include xsl:output with method=xml and doctype for xhtml so the XSL processor will output valid XML for post-processing steps.

Tom Mannanchery said...

Hi Jim,

The XSL works really nice for me. I have a question regarding the HTML Layout of the homepage where this pagelet is used.

I am using a custom 3 column html layout with a pagelet expanding 2 columns, from one of the Oracle red papers (I am very sure you know this red paper - Configuring a Contemporary User Experience in PeopleSoft Interaction Hub :) ).

In IE 8 and Firefox, this banner pagelet ends up having a bottom padding, creating a gap with the pagelets below and this gaps expands when an accordion in the left-most column is expanded. In chrome this works fine.

Do you have any suggestions regarding how to fix this?

Thanks,
Tom

Jim Marion said...

@Tom, does your accordion span 2 columns or does another pagelet span two columns? Actually, I guess it shouldn't matter. When you expand the accordion, does it move content in multiple columns, or just the column containing the pagelet? As far as the padding, I would have to use Firebug or IE developer tools to experiment with the CSS and table attributes to find a solution.

Tom Mannanchery said...

Hi Jim.

The accordion spans 1 column.
There is another pagelet that spans 2 columns.
When I expand the accordion, it increases the bottom padding of the the pagelet that spans 2 columns.
We solved this by changing the html layout.
Is it ok if I send you the code?

Thanks,
Tom

Jim Marion said...

@Tom, I am glad you have it solved. Thank you.

Tom Mannanchery said...

Hi Jim,

Using Interaction Hub, we can add Remote Menu Items to our navigation collections. Trying to add a link helps do that. Is there a way to add remote folders to navigation collections? 'Add Folder' functionality doesn't seem to support this. Do you have any ideas to work this around?

Thanks,
Tom

Jim Marion said...

@Tom, that is a good question. I have not tried that before. You might want to ask this question at support.oracle.com.

Tom Mannanchery said...

Thanks Jim. We 'cheated' a bit to get that working :). But I will surely ask the question to Oracle Support. It is a good feature to have.

Also, is it possible to add remote dashboards to navigation collections in Interaction Hub? When trying to add remote dashboards, some of them appear as menu items (like Manager Dashboard in HCM), but some don't (like HR Helpdesk Agent Dashboard in CRM). Have you seen this before?

Thanks,
Tom

Jim Marion said...

@Tom, I have added remote dashboards. Where I have had problems is with remote dashboards used as landing pages in WorkCenters.

If you find a use case that doesn't work, then I suggest you file a support case for it. I know that development wants to see use cases that don't work so they can resolve them.

Tom Mannanchery said...

Hi Jim,

We came across a weird breadcrumb issue while using the accordion xsl in Interaction Hub. We are using a navigation collection with remote menu items. After applying the accordion xsl, clicking on any CRef would navigate correctly, but the breadcrumb on the component would show names of all components visited before.

For eg, if I click Personal Information Summary, and then Compensation History, the breadcrumb would be like: Main Menu > Personal Information Summary > Compensation History.

We solved this by adding the following to the AbsolutePortalURLs:
PORTALPARAM_PTCNAV=& EOPP.SCNode=& EOPP.SCPortal=& EOPP.SCName=& EOPP.SCLabel=& EOPP.SCPTcname=
(We got this from the delivered xsl for Self Service)

Just wanted to check if you have seen something like this and if you did something different.

Thanks,
Tom

Jim Marion said...

@Tom, I have seen that. This is based on updates to the menu code for remote unified nav.

Did you append those parameters with empty values just like that or did you add values in your XSL?

Tom Mannanchery said...

Thanks Jim. That's a relief.

We initialized the values as shown below. We got this from the delivered xsl. Is this the right way to do it or is there a better way?








Thanks,
Tom

Tom Mannanchery said...

Sorry Jim. I just noticed that all the xml/xsl tags were filtered by the site.
What we did was,

1. We initialized the following variables:
scnode as value of "/NavCollection/SCNode" ,
scportal as value of "/NavCollection/SCPortal",
scname as value of "/NavCollection/@Name",
sclabel as value of "/NavCollection/Label",
scptcname as value of "/NavCollection/NavPageName",
IScript_AppHP as value of "/NavCollection/IScript_AppHP"

2. We then added the following values to the @AbsolutePortalURL:
PORTALPARAM_PTCNAV=@TargetCRefName&EOPP.SCNode=$scnode&EOPP.SCPortal=$scportal&EOPP.SCName=$scname&EOPP.SCLabel=$sclabel&EOPP.SCPTcname=$scptcname

Thanks,
Tom

Jim Marion said...

@Tom, perfect. Thanks for sharing!

Tom Mannanchery said...

Interestingly, this solution works on local pagelets with navigation collections having remote links, but doesn't work with remote pagelets (with navigation collections) imported in Interaction Hub. Banging my head now! :)

Jim Marion said...

@Tom, I can definitely relate to your experience. There are two ways to accomplish this:

1. Create the navigation collection in the content provider and publish it as a pagelet from the content provider.

2. Create the navigation collection in Interaction Hub using remote menu items.

I believe #1 is recommended. The problem caused by Remote Unified Nav is this: Interaction Hub has no information about the remote portal registry and therefore can't display the bread crumbs correctly. When using the menu directly, it builds the bread crumbs as you click, but going from a homepage pagelet directly to an item using a remote pagelet doesn't provide the proper context. I have experienced these frustrations and do not yet have a solution.

Tom Mannanchery said...

Hi Jim,

We went with option#2 because in our navigation collection we have menu items from multiple content providers.

In this regard, have you noticed any performance issues with pagelets that are created from navigation collections containing remote menu items?

Thanks,
Tom

Jim Marion said...

@Tom, I haven not.

random said...

Jim

I am trying to create more than one pagelets on the same tab that use accordian style navigation collections. When I do this, the 2nd pagelet doesn't have the control working and it appears in maximised/expanded state.

Is there any way to resolve this issue?

Many thanks

Jim Marion said...

@random, yes, absolutely. There are two things that can cause this:

1. Not using a unique ID in your XSL. My XSL uses unique ID's for each collection, so you should be OK there.

2. Including jQuery multiple times. I suspect this is the problem you are having. My post jQuery plugin Include Protection may offer a solution for you.

Harika K said...

Hi Jim, I tried to follow the steps to create the accordion navigation. But, I am getting just normal view. I am not sure, what is missing here. It is just showing the links under a folder. Please help!!

Jim Marion said...

@Harika, I'm not sure. Can you use Firebug or Chrome developer tools to inspect the generated HTML or JavaScript? Also check the JavaScript console for errors.

Simon Chiu said...

Greetings Jim,

We have been running pretty smoothly with our IH<->FS implementation last November. In the coming months we are linking our IH with HR and CS ~ lots of work ahead.

One thing that we got working in our current implementation is adding "Remote Menu Item" via the Add Link section in Navigation Collections.

I was under the assumption that these links would behave much like how they would in Unified Nav. IE if you add a component that a user didn't have access to, it would not appear, and conversely it would show up if you did have access.

Indeed this was working for us, until we started using the IB to add other remote content providers. I've contacted oracle support, and they have insisted if it was working the way I assumed, that was not as designed. Their stance is each navigation collection should be seen as a whole, so you assign the navigation collection to a particular role, and the user should see all the links, or not see the collection at all.

Is this the case? if so, I thought I'd put this out there to spare someone else the confusion. I do think it is useful to have Navigation Collections dynamically pickup security based on the user's security permissions in the remote content provider. It would simplify administration and usability, as there would be less security to worry about and less navigation collections if one could handle all the security.

Thanks!

-Simon Chiu

Jim Marion said...

@Simon, your assumption is correct. Navigation Collections are not a "whole or nothing" deal. If you don't have permission for a particular item, it should not show it. Navigation Collections are built on the portal registry API which should not include items for which you do not have access. If it is, then that is a bug. Please tell the support person to contact myself, Pramod, and Frank. We will look into this and confirm if there is a misunderstanding or something.

Simon Chiu said...

thanks so much Jim!! glad to know we weren't wrong after all. I'll follow up with Support and get this straightened out!

Harika K said...

Hi Jim,

I was able to successfully implement Accordion navigation after following the instructions. I have created the accordion navigation for Selfservice folder and Manager self service folder. Selfservice navigation is perfect. However, for manager selfservice, for few employees links do not appear. Let us say, under MSS, I have folder Learning and Development. Under Learning and development, there are two links. User is able to see only one. I dont have any issue with my id. It is happening for few employees. They are able to access all the links under normal navigation. Could you please suggest?

Jim Marion said...

@Harika, interesting. The only thing I can think of is security. One thing I noticed with navigation collections is that if you only have access to one item, it will eliminate the folder.

MrLeo said...

Jim, I have your PeopleTools Tips and Techniques book and I have seen you on a few occassions at Open World and Collaborate. I have implemented your accordion menu in 8.53 utilizing the now-delivered jQuery and jQuery UI libraries. My question now is could you please explain how you implemented the carousel navigation that you have demonstrated in some of your sessions/ presentations? Any assistance you could provide is greatly apprciated. Thanks, Leo

Jim Marion said...

@Leo, the data for the carousel comes from a Navigation Collection. I used pagelet wizard and an XSL transform to create the carousel. I wrote my own JavaScript and CSS for the Carousel effect. I have not published it and I have not seen anyone else with a published version.

Tom Mannanchery said...

Hi Jim,

Is it ok to use the meta tag in pagelet to perform a redirect?

meta http-equiv="refresh" content="0; url=http://new.example.com/address"

Thanks,
Tom

Jim Marion said...

@Tom, it is my experience that PeopleTools strips a lot of the head information out of pagelets. You can certainly try it, but I'm not confident it will work. An alternative would be to add a JavaScript that sets window.location.href to your target location. Of course, be sure to save before you get to step 5, because the Pagelet Wizard will load your pagelet content and redirect before you have a chance to save :). You may also have trouble getting to step 6 to register, but that is OK, because step 6 just automates creating a CREF for your pagelet. That is something that you can create manually by reviewing the values of other pagelet Wizard pagelets.

Tom Mannanchery said...

You guess it right Jim. It didn't work with IE, but worked with Chrome. I will do the JS redirect.

Thanks for the help. :)

Simon Chiu said...

Greetings Jim:

We will be connecting our IH with HCM and CS in the next few months. We have been using tabs that contain work centers (thanks to your help!) for our implementation of FS via IH.

A bit of marketing on Oracle’s site has interested me:

https://www.youtube.com/watch?v=gIZ1WC5-LM0&feature=youtu.be&t=2m55s
(see what happens when “Time Sheet” is clicked)

It looks like LightBox was implemented with Jquery UI. I have read the Configuring a Contemporary User Experience red paper and was successfully able to get the slider function to work, but I can’t find any documentation on loading components into a Modal window as shown.

A couple of questions:

a) Are Navigation Collections iScript Pagelets? Is it possible to wrap links in Peoplesoft’s openContentInModal function?
b) Modifying peoplecode for DoModal and DoModalComponent only seems to be available as a secondary screen as it has to launch from an original component ~ is this the solution?
c) You mentioned above a custom Transformer and PeopleCode to convert PSP urls into PSC urls is required for this ~ I’m a little lost as to how to proceed here.

Thanks!!
-Simon

Jim Marion said...

@Simon, yes the video uses a Navigation Collection, which, as you probably know, is in Portal Utilities. It is published through Pagelet Wizard. Pagelet Wizard's run time is an iScript. The Pagelet Wizard designer takes a Nav Collection in XML format and transforms it into HTML using XSL. With XSL you can do pretty much anything. What I am doing is creating the accordion, which it sounds like you have working. I also add an attribute to the links that DON'T have "open in new window" or "replace window" selected. I then use jQuery onload JavaScript to attach a click handler to those links that need to open in a dialog. The click handler uses a jQuery UI dialog that contains an iframe to open the link's href in a dialog iframe, making it look like the content is on the same page inside a dialog.

I am converting PSP into PSC using a custom data type. The data type uses the Meta-HTML processor from my PeopleTools Tips book to replace %ComponentContentUrl(PORTAL, NODE,_CREFID) with the content (psc) URL. This is required because navigation collections contain the portal URL, not the content URL. It is not safe to just replace /psp/ with /psc/ because content providers usually have different web servers, node names, etc.

Jenn said...

Hi Jim,

Just want to say thank you for all that you share on these topics. Really does help.

I am having an issue with my accordion menu. For current employees, it works great. For new hires, the bottom 3 levels are showing strangely. I've checked security and they all have the same roles, so I am not sure what's happening and am completely stumped.

Have you encountered this or heard of it before?

Jim Marion said...

@Jenn, usually what you are describing happens because of security. If you investigate the HTML structure of the accordion for these new hires, you may notice something like a header missing. This is because the nav collection data type eliminates folders if a folder only has one item, or even worse, makes it a single level nav collection if there is only one folder accessible to the user. I understand that you say they have the same roles, so that is perplexing. Unfortunately, that is the only time I've seen this odd behavior. If you have Interaction Hub, make sure that the roles match between the content provider and the Interaction Hub. Also make sure the nav collection links/CREF's have the permission lists you expect them to have.