on 01-08-2008 7:20 AM
HI all,
How to capture click event of button?..Please tel me
Thanks & Regards
HB
Hi,
Right click on the button in the OutLine view and select properties. In that you will find onAction event for the button. Here you can define a new action for the button.
Is this your question?
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you create and specify a action like "FireAction" for a button, in the attached java file you will have method generated like :
public void onActionFireAction(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionFireAction(ServerEvent)
//@@end
}
This method will be involed when the button is pressed and hence you dont need to check for click action.
Regards,
Ashwani Kr Sharma
Hi,
Then the solution which i have given will do.
Suppose your button is Go:
public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionGo(ServerEvent)
wdContext.currentContextElement().setTest(true);
// Here test is a context attribute.
//@@end
}
public static void wdDoModifyView(IPrivateTEST wdThis, IPrivateTEST.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
if( wdContext.currentContextElement().getTest()){
// Here you can do your part of coding
}
//@@end
}
Hope this will solve your problem.
thanks & regards,
Manoj
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.