on 08-07-2008 11:11 AM
Every WDA has COMPONENTCONTROLLER ,and it has interface, How to view class implemented this interface?
WDA is stored as meta data, there are no objects generated in the system when you activate your web dynpro component, the classes are generated at runtime only
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> WDA is stored as meta data, there are no objects generated in the system when you activate your web dynpro component, the classes are generated at runtime only
>
> Abhi
Actually that's not true. The interfaces get built as you are editing the component and compile like any other class when you activate. They are just hidden from the class builder to keep people from messing around with them directly and to keep from cluttering up the object navigator. They have to be built as you go otherwise SAP would have had to build a special syntax checker and code parser for the ABAP Code Completion for WDA (which we didn't do).
You can view the interfaces however. There is a button on the toolbar (or you can press CTRLSHIFTF1 or the menu path GOTO->Controller Interface).
http://www.flickr.com/photos/tjung/2740591187/
It displays the interface in a dialog window:
http://www.flickr.com/photos/tjung/2741429324/
Also in ABAP 7.1 and higher, the interace is also visible via the code completion via the implementation of the interface in WD_THIS.
Thanks for correcting me.
I was under the impresion that this code is also a meta-data, and at runtime the using this data framework generates class
http://www.flickr.com/photos/tjung/2740610915/
this is really awesome, ABAP editor lacks this functionality currently where most of the .NET and JAVA IDEs already have this
Although they're not meant to be modified directly, there are ways to access the underlying implementation class for display. One of them is to do an extended check on the component (SE80 -> Menu "Web Dynpro Component" -> Check -> Extended check).
You'll get a class pool name, for example:
/1BCWDY/60X4PUQ2SJIR41V7JI9M==CP
Copy all of it without the ==CP ending and you can open that in SE24. In Implementation section you have the includes for each component section.
There are times when you need to access that underlying code. For example, where I work at we need to do code reviews. It's simple and a LOT faster to search for specific statements on the whole class, rather than go method by method in the component (which doesn't have global search functionality).
Do you know Thomas if this will be implemented some time?
Anyway, i must repeat that you shouldn't attempt to modify that code by any means. Leaving component editing before accessing the code is desirable also.
Regards
>
> There are times when you need to access that underlying code. For example, where I work at we need to do code reviews. It's simple and a LOT faster to search for specific statements on the whole class, rather than go method by method in the component (which doesn't have global search functionality).
> Regards
Actually you can already do this. Just go to your Workbench settings and uncheck Method Based Editor on the Web Dynpro tab:
http://www.flickr.com/photos/tjung/2741523889/
Now when you go into any of the Web Dynpro objects, you will have an additional Implementation tab. It shows you the whole class interface as well as all of the method implementations inline. I would suggest this for your code reviews - and now you can use a search across all methods as well.
http://www.flickr.com/photos/tjung/2742361188/
I just realized that when I took the screen shot I was in display mode - but this is a code editor as well - so that isn't some kind of limitation of this mode. I just happened to have been in displaay only mode - and I'm feeling too lazy this afternoon to upload a new image
Great! This option saves some time.
Thanks for pointing it out.
As for your laziness, don't worry - it must be some kind of virus as I seem to be infected too! 😛
Regards
Edited by: Alejandro Bindi on Sep 18, 2008 6:24 PM:
Just posting back to warn others not to use the Implementation editor mode to modify the coding...at least not up to SP12. It has a bug with the heading comments, lost half of my code and also all the method descriptions including the standard ones for WD* methods. I had to roll back to the last version to fix it.
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.