on 02-12-2006 10:09 AM
Hi
I need an access to IWDComponent from java class that has only the application name and dc name.
<b>Is there a way to get access to the web dynpro application or controller using the given parameters (application name and dc name)</b>
<u>
The scenario in more details:</u>
I implement an external interface ("IViewListProvider") that allow me to define properties grouped in categoires and accessable to end-user.
I want to use the web dynpro MessagePool to define the properties description.
The problem is that I can't get access to the IWDTextAccessor of my IWDComponent withing my java class that implements that interface (("IViewListProvider")
I do have the following parameters in the method declaration:
public Collection getIViewProperties(String dcName, String applicationName,
String variantName, String iViewID, Locale locale,
Map applicationProperties) throws ObjectAccessException {
}
can I get access to the IWDComponent given the above paramaters
Nili,
Just don't do this.
Seriously, WebDynpro is a vendor(SAP)-specific variant of J2EE container (like EJB or WebApplications). WebDynpro classes rely heavily on this container behavior (lifecycle phase handling, control flow, class loading and references, thread-local variables etc etc). Providing such functionality outside of WD container is nearly impossible. And, in fact, you have to emulate such functionaliy to make your code work.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valerie,
I guess we still have a question here, the problem starts since we are using pure java interface within WD application.
we want to use the translation mechanism for some strings. so if we don't have access to the Text Accessor how can we translate our strings in runtime?
can you please elaborate how you see the solution?
Regards
Yoel
Hi VS,
I have similar kind of requirement. I need to access methods in webdynpro DC - interface controller in java project DC.
I could not find any clues on this.
I created a webdynpro DC, created a public part of the wdComponent. Also created one java project DC and added the public part craeted as an used DC in this.
Is it possible to access WD classes in this java project?
Please let me know how to achieve this if possible.
Thanks.
Try this code pls, you can translate your strings in runtime:
String resourceDir="com.companyName.sss.inventory.coms.wdp.ResourceInventory";
IWDResourceHandler resourceHandler = null;
resourceHandler = WDResourceHandler.createResourceHandlerForCurrentUser();
resourceHandler.loadResourceBundle(resourceDir, getClass().getClassLoader());
String lableCompany=resourceHandler.getString("message.message_pool_key");
Edited by: Ree Fish on Feb 20, 2009 11:25 AM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.