README-LOGIN-PAGE-CONTROLLER
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

LoginPage is a controller.  LoginPage.html is its correspondng view template.  No need to look for action classes or
action mapping files because in Tapestry there aren't any.

LoginPage includes these methods:

	activate()	- can be called by other pages to transfer control to the LoginPage.
	
	doHelloWorld()	- is the listener for the "hello world" link on the page.
					  Naturally, it activates the HelloWorld page.
					  
	doLogin()	- is the listener for the Login button on the page.

Ignore the annotations and other features for the moment, and let's look at a simple case.

HelloWorld
~~~~~~~~~~

On the LoginPage, let's say you click on "Click here for Hello World". In LoginPage.html we see:

	<a href="" jwcid="@DirectLink" listener="listener:doHelloWorld">Click here for Hello World</a>

What happens?

- The listener is doHelloWorld, so the doHelloWorld() method executes.

- It gets the HelloWorldPage by name (pages/login/WelcomePage) and invokes its activate() method.

- HelloWorldPage's activate() method tells Tapestry to make it active next and returns.

- The doHelloWorld() method ends, returning control to Tapestry.

- Tapestry displays HelloWorldPage, using 

	jumpstart.max.web.pages.login.HelloWorldPage.class as the controller, and
	pages/login/HelloWorldPage.html as the template for the view.

Returning
~~~~~~~~~

On the HelloWorldPage, let's say you click on "Return to Login page".  In HelloWorld.html we see:

	<a href="xyz" jwcid="@DirectLink" listener="listener:doReturn">Return to Login page</a>
	
What happens?

- The listener is doReturn, so the doReturn() method executes.

- It gets the LoginPage by name (pages/login/LoginPage) and invokes its activate() method.

- LoginPage's activate() method tells Tapestry to make it active next and returns.

- The doReturn() method ends, returning control to Tapestry.

- Tapestry displays LoginPage, using

	jumpstart.max.web.pages.login.LoginPage.class as the controller, and
	pages/login/LoginPage.html as the template for the view.

Next
~~~~

README-LOGGING-IN.  In Eclipse you can find it easily with Ctrl-Shift-R (or Cmd-Shift-R on the Mac).
