on 09-21-2005 12:03 PM
Hi All,
How can we make a button as default action. like, if i have a add button in the view and Whenever the user hits the enter key, the add buttons event should be fired. which fires the action assigned to the add button's event.
Thanks for your time.
- Raghavendra
Hello Raghavendra,
it is not possible to implement exactly scenario you described. But you can use following workaround:
1) Set button design as "emphasized" (Optional)
2) Call requestFocus for this button in wdDoModifyView for first time.
if (firstTime) {
final IWDButton button = (IWDButton)view.getElement("<ID_OF_BUTTON>");
button.requestFocus();
}
3) Assign the same action as for button to every inputfield.onEnter event.
final IWDAction onAction = wdThis.wdGet<ACTION_NAME>Action();
//...get element
((IWDInputField)element).setOnEnter(onAction);
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Starting with release NW04s, you can set the default button for a UI element container via property "defaultButtonId".
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
Thanks Rashchynski!! Workaround is pretty good to meet the requirement.
Thanks for your time...
- Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.