[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Hotkey 'Enter' for Formattedfield in GridHeader  XML
Forum Index -> Development
Author Message
unger

Power User

Joined: 22/07/2008 05:19:28
Messages: 261
Offline

Hi,

how can I give an Enter-hotkey to a formattedfield in a gridheader-cell?

Background: I use a gridheader row as a column-wise filter. The user should enter a search pattern and press enter instead of tab to next field (flush).

Kind regards,
Joachim
unger

Power User

Joined: 22/07/2008 05:19:28
Messages: 261
Offline

I found it: tabonenter



But it leaves the field, as "tab"onenter mentions.
Is it possible without leaving the focus? Or is there a parameter that indicates the last pressd key?
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

...yes, TABONENTER this is one possibility (because then the flush is executed...).

Another one would have been to use the normal hot-key-management. Assign a POPUPMENU in which one of the menu items has "Enter" as hot key. This possibility would be the one to choose if you did ask for a different hotkey than "Enter" to trigger the server roundtrip.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
unger

Power User

Joined: 22/07/2008 05:19:28
Messages: 261
Offline

Hi Björn,

are You sure that a popup menuitem works, when the focus is in a field?

Kind regards,

Joachim
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

...it ONLY works if the focus is in the field ;-)

Code:
 ...
     FIELD POPUPMENU="XXXXX"... ACTIONLISTENER="..."
 ...
 POPUPMENU ID="XXXXX"
     MENUITEM  COMMAND="enter" HOTKEY="10"
 


So here the focus is required in the FIELD. The ACTIONLISTENER of the FIELD is called with Event BaseActionEventPopupMenuItem, in which the name of the command ("enter") is passed.

Kind regards! - Björn

PS: hope this does not confuse, because your tabonenter-way is correct, too!

Björn Müller, CaptainCasa GmbH
unger

Power User

Joined: 22/07/2008 05:19:28
Messages: 261
Offline

Thank You!

Yes it works. I forgot to set the attribute popupmenu="VALIDATEPOPUP". Only setting hotkey in a menuitem isn't sufficient.
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team