on 2007 Dec 26 1:35 PM
Hello,
I want to fire a button automatically when we enter in a view, we are implementing the code in the "if(firsttime)" method.
The button id is "CostAssigment" and the event is || public final static String EVENT_COSTASSIGNMENT = "sap.xss.tra.event.costassignment" || and it fires the following action:
-
public void onActionCostAssignment(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionCostAssignment(ServerEvent)
LOGGER.traceEnter("onActionCostAssignment");
wdThis.wdGetFcTraUtilsInterface().viewValidation(wdControllerAPI).validate(true);
wdComponentController.raiseFPMEvent(TravelConstants.EVENT_COSTASSIGNMENT);
wdThis.wdGetAPI().requestFocus(wdContext.currentDetailsDataElement(),wdContext.nodeDetailsData().getNodeInfo().getAttribute(IDetailsDataElement.EDITOR));
LOGGER.traceExit("onActionCostAssignment");
//@@end
}
-
We have used the following code in other view where we wanted make the same (auto fire button) and runs OK but in this view this solution don't run:
-
wdThis.wdGetVcTreReceiptsTableController().raiseFPMEvent(TravelConstants.EVENT_COSTASSIGNMENT);
-
How can fire automatically the button and event or run the inside source code?
Best Regards and thanks in advance.
Pablo.
Hi Pablo,
If we want to fire any method or event automatically, we should use in wdDoInit() if it is a default view (i.e. Start view)
or use in onPlugFrom<Xview>() if it is navigated from Xview;
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
8 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.