on 09-02-2007 9:31 PM
Hi all,
We are on EP6 sp17 and I know it's possible to fill the parameter "default value" of the property metadata with a static value, but is it possible to fill the default value dynamically from an another property metadata?
In advance thank you for your help.
Pino.
Hi Pino,
I think I found the solution for setting the default value of a property via API. If you have the unique property id (propertyUniqueID) and the new default value that you want to set (newDefaultValue):
IConfigurationAccess icAccess = Configuration.getInstance();
IWDClientUser wdcu = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdcu.getSAPUser();
IUser user = WPUMFactory.getUserFactory().getEP5User(sapUser);
IConfigClientContext confContext = IConfigClientContext.createContext(user);
IConfigManager icManager = icAccess.getConfigManager(confContext);
IConfigPlugin icPlugin = icManager.getConfigPlugin(ConfigurationProxy.CFG_PLUGIN_CM_SERVICES_PROPERTIES_METADATA);
imConf = icPlugin.getAndLockConfigurable(propertyUniqueID, 0, 0);
imConf.setPropertyValue("default", newDefaultValue);
icPlugin.replaceConfigurable(imConf);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help Martin.
KR, Pino
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pino,
I don't understand exactly what you want to do, but it is not possible to change the default value of the property metadata configuration dynamically. It's definitely not possible through configuration and I can't find a way to do this through the API.
Please explain your requirement, maybe we can find a workaround!
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.