API Review request for RT-19375 Pagination UI Control
Daniel Zwolenski
zonski at googlemail.com
Wed Apr 25 06:04:10 PDT 2012
I'd be keen to see the design docs too.
One thought: is the use of an integer index the best way to reference
pages? Creates some possible complexities when pages are added and removed.
e.g. I want to jump to the 'details' tab, is this page 2 or 3? Perhaps a
generic 'ID value' would be useful, then the developer can use integers,
enums, strings or custom objects? I'm not sure either is best, just
thinking out loud.
Interested why were animations assumed to be not included? Just for effort
saving, or some other reason?
I'm very interested in the page virtualisation stuff. What are the thoughts
around this? The API uses a factory to create pages, but TabPane does not.
What's the rationale behind this difference (not complaining, just
wondering)? How/when will this be called (e.g. each time a page is shown,
or the first time and then it is cached, etc)? If the tab changes does the
page get notified that it is active/inactive?
What happens if the factory returns the same instance of a 'page' for two
different tabs (is this allowed or an error)?
Just thought of one thing with both TabPane and this - I'd like the ability
to prevent the user from leaving the current tab. In the case of form
entering if the user has entered some dodgy data I'd like to prevent them
from changing tabs (e.g. intercept and consume the change tab event) until
they fix the data up. Is this possible, should I file a separate JIRA?
There are a couple of components that are close cousins to this that could
be worth thinking about in the same process. Perhaps there is a common
superclass or room to leverage one thing with the other. Maybe not, but it
doesn't hurt to check:
* Wizard: a series of related 'pages' that have an order to them to be
stepped through. Typically form-based with a final 'submit'/'cancel'
* Carousel: a 'page' container that rotates between 'pages' (or just
Nodes). e.g. http://www.flashxml.net/3d-carousel-menu.html
* Browser: a 'page' container that has a defined history list of pages
visited but an undefined future. Typically pages are referenced by a URL
and you can move back/forward.
I'd also potentially see this 'page' control being used to implement a Mac
wheel sort of thing (http://support.apple.com/kb/HT2474). I think that can
be done as a separate control, i.e. a menu bar of icons that then
controlled the current 'page' in the pagination control. Just thought I'd
mention this as a possible extension/usecase for this pagination control to
keep in mind.
JFX Flow has tried to solve the Browser problem (and I think there is room
to improve). It is part of a bigger 'MVP' framework but I have lately been
thinking there would be merit in extracting that out so the basic
pattern-less component can be used on its own. This page control would come
close to being that component or at least the start of it.
The two biggest issues have been animations to transition between pages
(this is way messier than you may think with big implications on
everything), and page virtualisation (i.e. dynamically creating pages as
needed and activating/deactivating them, etc). If these are things you
*might* want to include down the road, I'd highly recommend having a bit of
a look at them up front to make sure you don't hamstring yourself when you
come to do them. Happy to share war stories from Flow if it helps.
On Tue, Apr 24, 2012 at 8:02 PM, Jeff McDonald <deep.blue.6802 at gmail.com>wrote:
> The JIRA issue is available now, but the design docs are in an internal
> Oracle server. Although the API docs are attached to the issue, seeing the
> design docs would be more helpful. I'd love to see some visuals and a demo
> as well.
>
> On Mon, Apr 23, 2012 at 4:49 PM, Jonathan Giles
> <jonathan.giles at oracle.com>wrote:
>
> > Fixed that for you....
> >
> > Thanks,
> > Jonathan
> >
> >
> > On 24/04/2012 10:47 a.m., Tom Schindl wrote:
> >
> >> The jira is private and can't be accessed by none oracle employees ;-)
> >>
> >> Tom
> >>
> >> Am 24.04.12 00:45, schrieb Kinsley Wong:
> >>
> >>> JIRA: http://javafx-jira.kenai.com/**browse/RT-19375<
> http://javafx-jira.kenai.com/browse/RT-19375>
> >>>
> >>> We propose to add a new Pagination control into our collection of UI
> >>> controls. The proposed api is attached to the JIRA for your review.
> >>>
> >>> Thanks
> >>> Kinsley
> >>>
> >>
> >>
>
More information about the openjfx-dev
mailing list