Univocally Identifying Current Page

Univocally Identifying Current Page

Hi guys. 
I've been playing around with the new cloud platform, and have this new toy that I'd like to share with everyone once it's finished.

I need to know if anyone knows a way to univocally identify the current screen.
My current approach is using a composite key of eSpace-Name + Webscreen.aspx/jsp.

However, I don't think this approach will work if SEO Friendly URLs are turned on, because I'm getting eSpace-Name from the url and PageName from HTTPRequestHandler's GetPageName.
Also, sometimes redirects don't change the URL correctly to match the current page, as is the case for a simple entry point for example.

Can anyone help shed some light on the subject? :)

P.S. Is there also any way to identify the current platform stack from within an application? Currently I have a boolean site property "IsDotNetStack" to control file extensions aspx or jsp, depending on that value. Would be nice to remove that configuration... :)
Hi António,

Check out the online help component. It uses an extension that univocally identifies the screen.
You also have a builtin function that tells you in which stack you're running.
Thanks André! :)

Hi António.

I'd go with based functions. Here are my ideas:

This should do. Unless you are referencing webscreens...

The GetEntryEspaceName function is a built-in function that returns the name of the eSpace that is processing the current Web request.

This function is only available within the expression editor.

To find the page I would go with ActiveSubMenuItemId. Almost every page is already identifying itself, so why not expand it?

The GetApplicationServerType function is a built-in function that returns the type of the application server where the eSpace is running.

This function is only available within the expression editor.

Output parameters
  • Text Type. The possible values are ".Net" and "J2EE".

EDIT: ups, too late...

I ended up not using GetApplicationServerType because the only thing I was using it for, was to know the extension of page files, I just used getPageExtension from HTTPRequestHandler.

It's all working as it should. Thanks once again guys.

Btw, is that ScreenKey the same for multiple environments? (eg. Between dev and production)
Good. Here's what it was for :)
I'm amazed by what you did.
I'll wait for a less beta version to download it, but can already see the potential in it.