cancel
Showing results for 
Search instead for 
Did you mean: 

Environmental Properties for IView - Web DynPro Java

Former Member
0 Kudos

Hello All,

My apologies if this information is easily found elsewhere - my inital search was not fruitful.

I have an IView with a form - when the user clicks the save button, I have code within the OnSave action which sends an email to a certain group of people. This email contains a link to a page within my portal.

I have 3 servers: DEV, TEST, and PRODUCTION, and ideally I would like to have the link in the email be dynamic based on some property that can be set by an administrator.

So instead of hardcoding http://<DEV>:port/application.

I'd like to say http://<variable>:port/application. where variable has a default of <PRODUCTION> and can be changed during development and testing.

Can someone advise on the best way to go about setting up this configurable property?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

vmadhuvarshi_
Contributor
0 Kudos

Andrew,

You can use Portal Navigation to overcome the hard coding problem. You need to maintain the same Role assignments for content in all 3 servers which incidentally are maintained by default when you transport the contents between servers. Once done in DEV and transported to TEST and PRODUCTION, this should work flawlessly without any modifications.

Take a look at [this article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b5380089-0c01-0010-22ae-bd9fa40ddc62] to get you started.

Hope this helps.

Vishwas.

Former Member
0 Kudos

Hi,

You can avoid hard code in your application and use the iView property called application parameters.

Provide the url in application Parameters text field of iView properties and access these application parameters in Web Dynpro runtime.

To access these application parameters in Web Dynpro runtime use this code snippet:

Create context attribute SystemUrl, and set this value while getting it from the iView application parameter properties value as below:


wdContext.currentContextElement().setSystemUrl(WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("Give param name here"));

Remeber once you troansport the iView from the DEV to TEST you have to change the iView application parameters with TEST environment url, same for PRODUCTION also.

Thanks

Krishna