0

is fast keyboard navigation in zk possible without extensive use of javascript

asked 2014-03-04 07:50:22 +0800

yennor gravatar image yennor
10 2

we used zk to reimplement an old access application. What we noticed thereby is that some users are used to use really keyboard navigation. e.g. - pressing tab like 5 times per second to get to the wished field. - entering data and jumping over the next few fields really quickly since they know the default values are fine.

Those provided us with some problems:

  • Navigating depending on choosen values:

Depending on what value they choose in a combobox, the next fields which gets the focus not necessarely is the one which is the one in the tab order (the one the browser activates after pressing tab). This is a problem if tab is pressed fast twice. The browser will jump to the second next field in tab order. But since the zk event handler (onbluring) needs some time to handle the event and set the next field which should get the focus, mostly the second tab just gets "eaten" and it resets the focus to whatever field would get the focus according to chosen value, and not the field after it.

  • Enable/disable fields depending on choosen values:

If fields are enabled or disabled depending on the choosen value, more or less the same problem as above happens. The fields get enabled or disabled not fast enough, so that they would get focus even they couldn't, or they don't get focus even they shouldn't. When pressing tab fast several times the amount of fields jumped will be wrong like that.

  • Using the onbluring event doesn't tell you for which reason the field lost focus

If it was a mouse event or because tab was pressed. When it was a mouse click event, obvisouly we don't want that zk resets the focus to an other field.

Most of the problems above we more or less got around by heavy use of javascript which means that a lot of the application logik is in java script now, which also makes it quite difficult to extend or change it. And it also doesn't always integrate very well with the zk events. e.g. The third problem, to tell the onbluring event if it was called, because of tab beeing pressed or a mouse event, we use javascript which calls a self created event in zk, let's call it userEvent. But we also extended all the input fields that they also accept enter to change focus, not only tab. Now when tab is pressed, first userEvent is called, and then onBlur event. When enter is pressed, first onBlur event is called, and then userEvent.

We are still using zk 5.

Somebody knows if above descriped problems are solvable in any other way, (without using javascript)? Or if updating to zk 7 would provide us with a tool to solve this problems (as far as i'm aware of, it wouldn't). I guess the above describen problems should be quite common. I implemented on-user-entered-values-depending-navigation in almost every bussines desktop application I wrote so far.

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-03-04 07:50:22 +0800

Seen: 9 times

Last updated: Mar 04 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More