On Fri, Aug 16, 2013 at 1:50 PM, Jeremie BOUSQUET
<jeremie.bousquet(a)gmail.com> wrote:
Hello,
I would like to add a "wizard" for a
specific UI part of my application.
Currently I know of 2 wizards that I like in XWiki: the distribution wizard
at startup, and the app within minutes one.
I'd hope to reuse something existing in xwiki to implement my own wizard,
but for now there's no such extension available.
Distribution Wizard and App Within Minutes Wizard are implemented
quite differently. They look somehow similar but that is just CSS and
you can easily reuse that by including the right stylesheet and using
the expected CSS classes and HTML structure.
The Distribution Wizard has its controller (the code responsible for
knowing the next step) written in Java and it is pretty specific. Each
step is written in a template on the file system using wiki syntax.
The controller is exposed as a script service so that each step can
say "I'm done, move to the next one".
In App Within Minutes Wizard there is no distinct controller. Each
step knows its next step. All steps are written in wiki pages (sheets)
and each step produces (at least) one wiki page. So when you are on
step N you are in fact editing in Inline Form edit mode the page that
is going to be produced by step N using the (edit) sheet associated
with step N. The flow is this: each step displays an HTML form that is
submitted to the same page, so on submit each step handles its data
(creates some pages, modifies others etc.) and then redirects to the
next step. Obviously the last step redirects to some result/view page.
So neither the Distribution Wizard nor the App Within Minutes Wizard
use a generic / reusable wizard.
My question is:
- would you kindly share some pointers, on what I could possibly reuse to
help me ?
- do you think it should be feasible ? (meaning, it
won't take me months to
achieve ;) )
If the relation between the steps is complex (possibly with
ramifications) then it's better to follow the Distribution Wizard
approach with a distinct controller. Otherwise, if you have just a
linear static list of steps then the App Within Minutes approach is
best and it is quite easy to implement.
Hope this helps,
Marius
I would be really interested in re-using the distribution wizard, as I also
plan to have some ajax calls from it + some progress bars displayed here
and there :)
Many thanks,
Jeremie
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users