I’m trying to create a “breadcrumb navigator” for my app, similar to the one shown in Help.
Something like this:
Home > First Page > Second Page > Curr Page
so the user can simply see how they got to where they are and then can also quickly jump back to any previous page by clicking on the appropriate link.
I have the page names working for my link labels, but I can’t get the url values for the onclick events.
I’m trying to get the page url using:
context.getUrl().toString();
But, I’ve tried putting it in the form custom control beforePageLoad, afterPageLoad, postOpenDocument - they all return an empty string.
If I simply put the code in a computedfield, it shows the url correctly, so I suspect that I’m trying to get it when the page doesn’t quite know it yet. I also tried putting the code in the afterPageLoad of the xpage itself (which contains the form custom control), but still get an empty string.
Is there another command I should be using to get this? - and where do I put it?
Background: I created a function in my xpServerSide script library to process the navigators values, and then in each page, I’m just calling UpdateNavigator(pgname, pglink). So, as each page is opened, I call the function to update the navigator.
Can I accomplish what I’m after this way? - or, should I be using another method?
Another thought - is there a size limit to a sessionScope variable? Maybe the sessionScope var can’t hold that long of a string?
tia