cancel
Showing results for 
Search instead for 
Did you mean: 

How to define the Order of Entry Points programmatically?

Former Member
0 Kudos

Hi Experts,

how to define the Order of Entry Points programmatically?

Is there any example doc or program for this?

Thanks to all of you in advance.

regards,

Raissa

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Raissa

You can try something like this.

Hashtable env = new Hashtable();

env.put( Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY );

env.put( Context.SECURITY_PRINCIPAL, request.getUser() );

env.put( Constants.REQUESTED_ASPECT,PcmConstants.ASPECT_ADMINISTRATION );

env.put( IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, request.getUser());

IPcdContext initPcdCtx = (IPcdContext) new InitialContext(env).lookup( "" );

IAdminBase adminBase = (IAdminBase)initPcdCtx.lookup( "portal_content/Sample/Sample" );

IAttributeSet attrSet = (IAttributeSet)adminBase.getImplementation( IAdminBase.ATTRIBUTE_SET );

Check for the method like attrSet.getAttributeIds() which returns enumeration. Print all the enumerated values which are the properties of the looked up iView.

Check the property for the "Sort Priority". It should be something like com.sap.<something>.SortPriority

Then you can set the priority using setAttribute(<property>,true/yes) and then use save() to save the changes.

Hope this helps you.

Regards

Harini S

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Raissa,

You could do a PCD search of all objects with entry point equal to yes/true (to get all entry points), and then set the sort priority to whatever you want.

If you knew the entry point, you could just do a lookup and then set the sort priority.

Daniel

Former Member
0 Kudos

Raissa,

In the Role you can set the value of the 'Sort Priority' property for each of your entry points with a number, which determines their order of display.

Cheers,

Steve