on 10-27-2005 3:38 PM
Hello,
within NWDS I set some user defined Application Properties like "CONFIG_ITEM". How can I access this in my WebDynpro application?
I tried the following
WDDeployableObjectPart currentAppPart = wdComponentAPI.getApplication().getDeployableObjectPart();
IWDConfiguration config = WDConfiguration.getConfiguration(currentAppPart);
String configured = config.getStringEntry("CONFIG_ITEM");
At the second line I get an WDConfigurationNotFoundException. So obviously that's not the correct way...
Thanx for any help,
Frank
Hi Frank,
Try this
IWDApplication application = wdComponentAPI.getApplication();
Properties properties = new Properties();
Collection wdProperties = application.getApplicationInfo().getApplicationProperties();
for (Iterator iter = wdProperties.iterator(); iter.hasNext();) {
IWDApplicationPropertyInfo wdProperty = (IWDApplicationPropertyInfo) iter.next();
if ("CONFIG_ITEM".equals(wdProperty.getName()){
String config_item = properties.getProperty(wdProperty.getName());
break;
}}
Let me know if you have any problems.
Regards,
Shubham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was a good hint Modified your source code a little bit and it works now:
IWDApplicationInfo application = wdComponentAPI.getApplication().getApplicationInfo();
String config = application.findInApplicationProperties("CONFIG_ITEM").getValue();
Thank you very much.
I would like to close this as answered and reward you with points... But there are no controls at time showing up
Okay got your points
Message was edited by: Frank Schulten
Hello,
I've a question... Are these properties configurable without redeploying the Web Dynpro application?
We have some constant values defined in some Web Dynpro applications and we wanted the user could change it easily. So if these application properties could be maintainded easily by the user, we could use it for definig those constants.
Thanks in advance,
jc!
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.