Skip to Content
0
Former Member
Dec 26, 2007 at 01:35 PM

Auto fire button/event Web Dynpro Java

17 Views

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.