on 01-23-2009 10:27 AM
Hi Expert,
I would like to simulate the "buttton click" in the wdDoInit ?
I have this action :
public void onActionRetour(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionRetour(ServerEvent)
wdThis
.wdGetWDCompInterfaceWinInterfaceViewController()
.wdFirePlugTo_Menu(
wdContext.currentS9521Element().getZnigend(),
1);
//@@end
}
When I excute it by clicking on the button, it's Ok, but if I want execute it into the wddoInit method, I have an error : "com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Instance of interface view controller WDCompInterfaceWinInterfaceView does not exist. "
Could you help me ?
best regards
Tony
Edited by: Tony MORELLET on Jan 23, 2009 11:27 AM
Hi,
create a method and write the code from your action in that method:
Now, you can call this method from action as well as wdDoInit().
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all,
I have solved my problem by another way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tony,
Webdynpro follows a phased model. Execution happen in phases. Controllers are initialized first then windows and then views. In your case, in your controller initialization code, you are trying to access your window to fire the plug. When the controller is being initialized your window is not yet loaded. Hence you get the error. You cannot execute anything related to the window or view in your controller wdDoInit code.
You can learn more about the phase model [here in section 8|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50b0f2aa-20d0-2a10-1685-d163d88a3e09].
Regards,
Sanyev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
The wdDoInit method is a Hook method whose source code is executed when the view controller is initialized.
then the view is loaded.So how is it possible to perform button click like action in doinit().
button click action invoked when the button is clicked.
the button is embeded within the view
view is controlled by the view controller.
if u want to check the button click ,then it has to be done after the view controller is loaded and not while its being loaded.
Regards
Jayapriya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have created a method that calls from the WdDoInit method.
public void Bind_Menu( )
{
//@@begin Bind_Menu()
wdThis
.wdGetWDCompInterfaceWinInterfaceViewController()
.wdFirePlugTo_Menu(
wdContext.currentS9521Element().getZnigend(),
1);
//@@end
}
I have the same message :
" com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Instance of interface view controller WDCompInterfaceWinInterfaceView does not exist. "
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Morellet,
Your code seems like you are navigating to another view by clicking on button as you used fire plug out method , hence it works fine .
But i dont know why you are trying to navigate to another view when loading a current view , the error may be bcoz of that , since the view before getting initialized you are trying to navigate to another view its showing error like the current view does not exit. I think you cant do so.!!!
Regards,
Sam Charles J
Hi Tony,
Better approach is create one Method and call that method in WdDoInit().
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.