You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Sandro Martini <sa...@gmail.com> on 2009/07/23 10:29:58 UTC

Usability in Pivot Applications for Data Entry

Hi to all,
I have a requirements for a new, real application to be done with
Pivot (i hope :-) ), and I'd like to discuss with others if what i
need is already implemented or if it needs some enhancements.

I have to create an Application (i think mainly deployed via Web
Start, or as a zip, or ips, or Applet, it's not important at the
moment) that have to be fast for data entry operations, so i need:
- to handle many operations via Keyboard Shortcuts, and if possible to
attach them to any Pivot visual component (i don't know if this it's
already available), and attention: including function keys
    -- and in case of Applets there is the problem of trapped
shortcuts from (different) browsers, so this will not be my last
option ...
    -- here i have to attach shortcuts to menu elements, form fields,
buttons, tab and other navigation elements ...
    -- attach the same shortcut for some common operations, like
assign <F12> for the Save operation in many different forms where the
control will be handled by the related element on the visual panel ...
i hope to be clear explaining this :-)
- to handle fast and simple focus changing between form elements and
between different forms (tabs, etc) using the tab key
- etc ...


Given these requirements I've tried also some Web 2.0 stuff (using
some standard Javascript library with ajax support etc), but I don't
like the approach of different languages (but this is a personal
preference), and first it's not enough fast for the user (for example
after some click they have to wait response from the server, while in
our case we could have the response or the related visual element
cached).

I think that this is a real use case we should handle to make the real
difference with all "standard" web 2.0 sites ... ah, some time ago
i've read some articles where our approach is called Web 3.0, cool not
?


What do you think ?
Someone has already tried something like this ?

Tell me if i can help if something is missing or needs enhancements ...


Thanks,
Sandro

Re: Usability in Pivot Applications for Data Entry

Posted by Sandro Martini <sa...@gmail.com>.
Ok, I'll try with a prototype next weeks ...

Bye,
Sandro

Re: Usability in Pivot Applications for Data Entry

Posted by Greg Brown <gk...@mac.com>.
> And on the focus passing between components (like fields in the same
> form) for example after writing a code in a field, pressing <Enter> or
> when the data inside the field has been automatically validated, will
> it be possible with an event to trigger, right ?

Components transfer focus on Tab key press. To support your use case,  
you could attach a key listener to the parent container and call  
transferFocus() on the currently focused component when the Enter key  
is pressed.

> And the same for example also writing data in a Table ... where
> <Enter> for example goes to the next cell or row in the table (after
> optional validation of cell contents).

You can write a custom cell editor that will do this.


Re: Usability in Pivot Applications for Data Entry

Posted by Sandro Martini <sa...@gmail.com>.
Hi,

>> And to apply also to first field in any form can i define in the
>> "global" space ?
>
> Not sure what you mean by this.
Instead of defining shortcuts for these elements in "local" spaces
(inside the related screen) at this point I think it's possible to
define them inside the "global" space, but using different shortcuts)
... also if they aren't main application elements.

> Spinner already handles key events. After thinking about it more, I'm not
> sure if we would want to add platform support for keyboard-navigating tab
> panes and accordions, since a) I'm not sure what the right generalization
> might be and b) it's easy enough to do in application code. Either way, you
> can do this pretty easily.
Ok, if available it's better, otherwise no problem.
My trouble here is to ensure that all Pivot Components are ready to
work in this way (as an optional behavior), so developers can only use
existing functions or attach their code to standard framework events.

And on the focus passing between components (like fields in the same
form) for example after writing a code in a field, pressing <Enter> or
when the data inside the field has been automatically validated, will
it be possible with an event to trigger, right ?
And the same for example also writing data in a Table ... where
<Enter> for example goes to the next cell or row in the table (after
optional validation of cell contents).


> You could always display the shortcut next to the field, or as a tooltip, or
> when the user presses some key combination that means "show me the shortcut
> keystrokes"...
Yes, I like this idea.


Thanks again,
Sandro

Re: Usability in Pivot Applications for Data Entry

Posted by Greg Brown <gk...@mac.com>.
>> Do you mean that you want to prevent the browser from receiving the  
>> key event?
> In Applets, I don't know if Browser handled shortcuts are trapped by
> the browser (so they aren't usable inside the Applet), or if having
> the focus in the applet if they are available ... I've never tried
> this.

I believe the applet gets the event first, but I could be wrong. This  
could also vary across different browsers/JVM versions, etc.

>> Do you mean that you want to set focus to a component when a given  
>> keystroke is entered? e.g. Ctrl-N jumps immediately to the name  
>> field?
> Yes, could be useful (including optional usage function keys as
> shortcuts)

OK. The best way to handle this is probably to attach a keyboard  
listener to each of your various tab panels (as you describe below for  
your other use case).

>>>  -- attach the same shortcut for some common operations, like
>>> assign <F12> for the Save operation in many different forms where  
>>> the
>>> control will be handled by the related element on the visual  
>>> panel ...
>>
>> Sounds like another use case for the action dictionary...
> Great, so I have to define my shortcuts in every place i need, like:
> "global" shortcuts (menu elements, and other main elements, tabs,  
> etc),
> and "local" shortcuts defined inside the screen, right ?

Right.

> And to apply also to first field in any form can i define in the
> "global" space ?

Not sure what you mean by this.

>>> - to handle fast and simple focus changing between form elements and
>>> between different forms (tabs, etc) using the tab key
>>
>> Yes, this is supported, though you may need to attach a key  
>> listener to your tab pane in order to handle the keystrokes for tab  
>> switching. TerraTabPaneSkin doesn't currently do this, though we  
>> could easily add it.
> Yes, having it could be great.
> Do you remember if there are other elements that need this (like
> spinners, accordion, lists, date picker, etc) ?

Spinner already handles key events. After thinking about it more, I'm  
not sure if we would want to add platform support for keyboard- 
navigating tab panes and accordions, since a) I'm not sure what the  
right generalization might be and b) it's easy enough to do in  
application code. Either way, you can do this pretty easily.

> I'm targeting some new applications for specialized users that works
> mainly on Data Entry, so an assumption is that they remember all
> shortcuts they need ...

You could always display the shortcut next to the field, or as a  
tooltip, or when the user presses some key combination that means  
"show me the shortcut keystrokes"...

> In last years I've seen (and written) many many times applications
> ported to web 1.0 or 2.0 where full time users works not-so-fast as
> before ... ok, there have many other advantages

Pivot was designed specifically to address use cases like this  
(internal application development, data entry, etc.). It is one of the  
things that differentiates Pivot from Flex and Silverlight - we  
emphasize the "application" part of RIA, whereas Silverlight tends to  
emphasize the "rich" part, and Flex sort of sits in between.


Re: Usability in Pivot Applications for Data Entry

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
as always thanks for your answers ...

> To me, this sounds like a use case for the action dictionary of a Window. This dictionary maps keystrokes (including modifiers) to Actions.
Ok, I have to try to use it.

> Do you mean that you want to prevent the browser from receiving the key event?
In Applets, I don't know if Browser handled shortcuts are trapped by
the browser (so they aren't usable inside the Applet), or if having
the focus in the applet if they are available ... I've never tried
this.
Do you know if / how can works ?
As soon as possible I'll try to make some experiment ... and report the results.

> Do you mean that you want to set focus to a component when a given keystroke is entered? e.g. Ctrl-N jumps immediately to the name field?
Yes, could be useful (including optional usage function keys as
shortcuts), but i agree that this only on fields is a minor case,
while is more important with other elements, to avoid selecting the
right form/screen via mouse (but always available, for users like us
that uses many many applications everyday :-) ).

>>    -- attach the same shortcut for some common operations, like
>>assign <F12> for the Save operation in many different forms where the
>>control will be handled by the related element on the visual panel ...
>
> Sounds like another use case for the action dictionary...
Great, so I have to define my shortcuts in every place i need, like:
"global" shortcuts (menu elements, and other main elements, tabs, etc),
and "local" shortcuts defined inside the screen, right ?

And to apply also to first field in any form can i define in the
"global" space ?


>>- to handle fast and simple focus changing between form elements and
>>between different forms (tabs, etc) using the tab key
>
> Yes, this is supported, though you may need to attach a key listener to your tab pane in order to handle the keystrokes for tab switching. TerraTabPaneSkin doesn't currently do this, though we could easily add it.
Yes, having it could be great.
Do you remember if there are other elements that need this (like
spinners, accordion, lists, date picker, etc) ?
Tell me if open an RFE in JIRA ... and if possible for the 1.3.x, ok ;-) ?


I try to better explain my real use case (could be a start description
to put in JIRA, or in the related future demo/tutorial):

I'm targeting some new applications for specialized users that works
mainly on Data Entry, so an assumption is that they remember all
shortcuts they need ... but in any case my first requirement is to
give them an user interface that can speed up their operations, using
the mouse only a little, and usually do much of the work via keyboard,
like their old applications via Terminal (Console).

So focus/selection on an element (menu element, text field, tab,
button, date picker, etc.) is a must.
Then operations like focus change via the <Tab> key or other ( like
fill the value in a text field and automatically or after pressing
<Enter> or a chosen key/shortcut) should trigger validation (optional)
then move the focus to the next field in the form ... etc.

So my plan to implement with Pivot, maybe this is implementable also
with web-2.0 (much Javascript stuff and ajax, ok using some standard,
robust, and common library) but as written before I think could be
much maintenable using a single language and framework.
And if required, I could use the off-line mode of (Web Start)
Applications, maybe also with a local Database.
Otherwise i see solutions using dot NET, but I'm on the Java side of
the force ...

In last years I've seen (and written) many many times applications
ported to web 1.0 or 2.0 where full time users works not-so-fast as
before ... ok, there have many other advantages, but now we can use
the best of both worlds (or use Pivot applications/applets where the
web 2.0 stuff is not enough), reusing all the stuff on servers.


Sorry for the long mail, but I think use cases like this should be
handled in any detail by us (Pivot), to ensure a good/fast user
productivity (or "experience", a la Microsoft).

Tell me if I can help on this, or if not in the implementation, in a
Demo (if wanted, or if not already in other existing demos/tutorials).


Thanks very much,
Sandro

Re: Usability in Pivot Applications for Data Entry

Posted by Greg Brown <gk...@mac.com>.
>I have to create an Application (i think mainly deployed via Web
>Start, or as a zip, or ips, or Applet, it's not important at the
>moment) that have to be fast for data entry operations, so i need:
>- to handle many operations via Keyboard Shortcuts, and if possible to
>attach them to any Pivot visual component (i don't know if this it's
>already available), and attention: including function keys

To me, this sounds like a use case for the action dictionary of a Window. This dictionary maps keystrokes (including modifiers) to Actions.

>    -- and in case of Applets there is the problem of trapped
>shortcuts from (different) browsers, so this will not be my last
>option ...

Do you mean that you want to prevent the browser from receiving the key event?

>    -- here i have to attach shortcuts to menu elements, form fields,
>buttons, tab and other navigation elements ...

Do you mean that you want to set focus to a component when a given keystroke is entered? e.g. Ctrl-N jumps immediately to the name field?

>    -- attach the same shortcut for some common operations, like
>assign <F12> for the Save operation in many different forms where the
>control will be handled by the related element on the visual panel ...

Sounds like another use case for the action dictionary...

>- to handle fast and simple focus changing between form elements and
>between different forms (tabs, etc) using the tab key

Yes, this is supported, though you may need to attach a key listener to your tab pane in order to handle the keystrokes for tab switching. TerraTabPaneSkin doesn't currently do this, though we could easily add it.


Re: Usability in Pivot Applications for Data Entry

Posted by Greg Brown <gk...@mac.com>.
>I have to create an Application (i think mainly deployed via Web
>Start, or as a zip, or ips, or Applet, it's not important at the
>moment) that have to be fast for data entry operations, so i need:
>- to handle many operations via Keyboard Shortcuts, and if possible to
>attach them to any Pivot visual component (i don't know if this it's
>already available), and attention: including function keys

To me, this sounds like a use case for the action dictionary of a Window. This dictionary maps keystrokes (including modifiers) to Actions.

>    -- and in case of Applets there is the problem of trapped
>shortcuts from (different) browsers, so this will not be my last
>option ...

Do you mean that you want to prevent the browser from receiving the key event?

>    -- here i have to attach shortcuts to menu elements, form fields,
>buttons, tab and other navigation elements ...

Do you mean that you want to set focus to a component when a given keystroke is entered? e.g. Ctrl-N jumps immediately to the name field?

>    -- attach the same shortcut for some common operations, like
>assign <F12> for the Save operation in many different forms where the
>control will be handled by the related element on the visual panel ...

Sounds like another use case for the action dictionary...

>- to handle fast and simple focus changing between form elements and
>between different forms (tabs, etc) using the tab key

Yes, this is supported, though you may need to attach a key listener to your tab pane in order to handle the keystrokes for tab switching. TerraTabPaneSkin doesn't currently do this, though we could easily add it.