cancel
Showing results for 
Search instead for 
Did you mean: 

Action when pressing Enter

Former Member
0 Kudos

Hi NG,

how do I craete an Event when 'Enter' is pressed.

In Deatail:

In my App there is a button. I want to fire the action 'onAction' not only by clicking that button but also when 'Enter' is pressed.

Kind Regrads

Stefan

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

This is also going to be a serious issue for me. I NEED to be able to use the enter key in my Web Dynpro development. The user is used to using the enter key as it works in their existing Webgui Workplace programs. Is it really such an issue to use the enter key in a Web Dynpro development ?

Does anyone have any more information as to whether this is possible in NW2004 ?

Ulli_Hoffmann
Contributor
0 Kudos

Hi Stefan,

Krish is right. In order to implement this functionality

you would need at first to use setfocus() for the button and then handle the onenter() action.

But neither of the two is possible in this "powerfull" framework.

regards, Ulli

Former Member
0 Kudos

Hello,

Is this really true? I can't believe that SAP has not provided something simple like this.

Does SAP monitor these postings and reply? If so, could we get confirmation from SAP that this functionality is in fact NOT available?

Thanks

David

Former Member
0 Kudos

Since NW04s there is a property "defaultButtonId" on every UI element container.

/**

  • Returns the value of the <code>defaultButtonId</code> property.

  • The initial value is <code>""</code>.

*

  • Optional ID of a button (which must belong to the same view) which is used as a default button for this container. Whenever the focus is within this container and pressing ENTER would trigger the default button, that button is highlighted somehow to indicate this.

  • Note: pure layouting containers ignore their default button setting.

*

  • @return the current value of the defaultButtonId property

  • @see #setDefaultButtonId(String)

*/

public String getDefaultButtonId();

Armin

Former Member
0 Kudos

Excellent info, when is NW04s gonna be released to existing NW04 customers?

Former Member
0 Kudos

As far as I know, NW04s will only be available to ERP customers, not as a standalone release.

Armin

Former Member
0 Kudos

Is this new functionality then going to be part of a future SP instead?

Former Member
0 Kudos

As far as i know u cannot create customized events.

No There is no enter event attached to button

u cannot create that

Sorry for the reply

yes what i said was corect that u cannot create onEnter Action for the button but the onAction or onEnter performs same for the button.

u can try onEnter by pressing tab key and having focus on the button

With Wishes

Krishna Kanth

Message was edited by: krish kanth