On May 19, 2010, at 9:30 AM, oskar_a wrote:
Hi,
I'm developing an application with T5 (Tomcat, Hibernate+MySQl). And
I'm
looking for a solution for the initial page. The user shold see the
initial
page at the first start of the application. On this page he have to
create
an admin (of the web appication) and set default values. So this is a
essential step for the running of the application but I need this only
single time (after the application start), so it's not really make
sense to
implement this on my index page (and connect every time to the
database and
look if there is an admin defined).
You are quite right. Most likely you will have the "start" page's
activation logic detect a new install (e.g. no users defined?) and
redirect to another page which has the initial setup procedure. By
laying out (approximately) one high-level function per page, Tapestry
lets you better organize your app.
As an aside, a slightly better solution might be to have a "default"
user which is in the initial database. Then a freshly setup app is
less vulnerable to a random person/bot finding it before it can be
properly setup.
--
Robert Hailey
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org