on 09-19-2007 4:00 PM
Folks,
I have declared a server event in the view and when I am trying to call that event in DO INIT method of view , it is not firing the event .
<i><b>
public void wdDoInit()
{
//@@begin wdDoInit()
// set icon file names
wdContext.currentContextElement().setIconLeftArrow("topLvlScrollerLeft.gif");
wdContext.currentContextElement().setIconRightArrow("topLvlScrollerRight.gif");
// hide display when errors during startup
if(wdContext.currentContextElement().getErrorDuringInit())
{
wdThis.wdFirePlugOutEmpty();
};
wdThis.wdGetDaylyChangeModeAction();</b></i>
Hi,
You are not calling the event handler method. Try this:
//This returns an IWDAction - doesn't call it.
//wdThis.wdGetDaylyChangeModeAction();
//Call it like this
onActionDaylyChangeMode(null);
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think that way you get the action but you are not firing the event. To do this you can make a method in the controller called for example fireXXXAction() and in that method fire the event with wdThis.firexxxx().
Now you just have to call this method from the view in which you want to fire the controller event.
Message was edited by:
Eduardo Cabezas López
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have created a action event
<i><b> public void onActionDaylyChangeMode(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionDaylyChangeMode(ServerEvent)
wdThis.wdGetVcCatRecordEntryInterfaceController().blcEvent(VcCatRecordEntry.ACTION_CHANGE_MODE);
wdContext.currentContextElement().setSelectedTab("TabCatRecordEntryDay");
wdContext.currentContextElement().setTemp("Changed Tab");
//@@end
}</b></i>
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.