cancel
Showing results for 
Search instead for 
Did you mean: 

Property File in Webdynpro

Former Member
0 Kudos

hi all,

There is a property file in my application and i am not sure about using it. I want to display value in drop-down in webdynpro application?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arpitha,

this might help you,

create a node and two attributes and add this code in init.


		InputStream is = getClass().getClassLoader().getResourceAsStream("xxxxxxx.properties");
			Properties property = new Properties();
			IPublicAppview.ISystemElement systemEle = null;
			//IPublicConnectApp.ISystemElement systemEle = null;
			try 
			{
				property.load(is);
				Iterator iterate = property.entrySet().iterator();
				while (iterate.hasNext())
				 {
					Map.Entry map = (Map.Entry) iterate.next();

					systemEle = wdContext.node<nodename>().createSystemElement();

					systemEle.set<AttributeName>((String) map.getKey());
					systemEle.set<AttributeValue>((String) map.getValue());

					wdContext.node<nodename>().addElement(systemEle);

				}
				
				
				wdContext.nodeSystem().addElement(systemEle);				
			} 
			}

please check this for more information.

http://help.sap.com/saphelp_nw04/helpdata/en/45/e7e14b517b42788a1c166f9f32455e/content.htm

Answers (1)

Answers (1)

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Have a look at this Quize application tutorial, this will guide you how to use resource bundle.

Regards,

Vijai