How to get a string representaion of stepPage ?

Hi All,

In Java Code i've code like ClipboardPage c1=tools.getStepPage(); how can i get string representaion of step page. While i was trying by String s1=c1.toString(); It is returning nothing. Is there any idea?.

But it was wroking fine for ParameterPage. I could not get string of stepPage.

Thanks in advance,

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.


Keep up to date on this post and subscribe to comments

February 15, 2011 - 9:42am


I tried that thing too. But this code c1.getName() returns empty string.

Thanks and Regards
Alagar Pandi.

February 15, 2011 - 10:32am

Hi Raghu Aitha,

Thanks for your reply. I know it. But I've to get current page name in html property code. Since we need editable fields in list view, we need the current step page name ie pyListViewContentPage.pxResults(i). "i" will be varies for each and every row of page list.

But I resolved by temporarily but that is not permanent solution. I need a permanent solution.

Alagar PAndi.

February 15, 2011 - 10:43am

What are you trying to accomplish?

Indeed, getName() returns the name of the page if it is top-level.
It appears that you have an embedded page, so you really want the path of the page.

This is a rough idea of how you could write a function to construct a path. If it doesn't exist in the standard API, it should.

[code]String path = "";
String pagename = myStepPage.getName();
ClipboardPage page = myStepPage;

while (pagename.equals("")) {
ClipboardProperty cp = page.getParentProperty();
String proppath = "." + cp.getName() + "(" + cp.indexOf()+ ")";
path = proppath + path;
page = cp.getPageValue();

path = pagename + path;


March 6, 2011 - 3:05pm

Try getReference(). It returns the absolute reference to a page is embedded.


February 10, 2016 - 4:16pm

Hi All,

The following worked for me, from the rule (e.g., dt): @(Pega-AppDefinition:Utilities).pxGetStepPageReference()

returns String which represents a full page name.

The following works from the function/java:

PublicAPI tools = (PegaAPI) ThreadContainer.get().getPublicAPI();
return tools.getStepPage().getReference();