on 06-25-2010 10:25 AM
My requirement is to access the wdcontext values in the my util classes.
kindly suggest how to access the context value in my util class
Regards
Priya
The context reference must be passed to the .java class in order to access same in the .java
for example,
Change MyUtil.java - get the reference to this file.
public class MyUtil {
//make a local variable of context element type.
private IPrivateCompView.IHashContextElement local_context;
//add context type in Constructor
public MyUtil (IPrivateCompView.IHashContextElement local_context, /*rest of params*/){
this.local_context = local_context;
//.... rest of initialization
}
In Webdynpro, initialize the call by passing the context reference.
IPrivateCompView.IHashContextElement hashmap = wdContext.currentHashContextElement();
//initialize my class
new MyUtil( hashmap, /*rest of params*/);
regards,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priya,
First you have to create on .java program and put in to the particular package
For Ex: com.sap.tc.webdynpro.until this package having filename.java
how to access the context value in you are util class
1. Create one Value attribute under you are context.
Go to that value attribute properties type = here click on Elipse icon available. Please Click that icon Open the One Popup Window
In that popup window Choose Java Native Type and Click on Browse Button again Open one more Popup window
Here you can Pass you are java name (filename.java) and select that Click on OK Button
Hope this is Help full for you
Regards
Vijay Kalluri
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.