John Aronson schrieb:
on the page http://tapestry.apache.org/tapestry5/tutorial1/hilo.html

Let's start with the code, and break it down:

src/main/java/org/apache/tapestry5/tutorial/pages/Index.java

package org.apache.tapestry5.tutorial.pages;

import java.util.Random;

import org.apache.tapestry5.annotations.InjectPage;

public class Start

{

  private final Random random = new Random();

  @InjectPage

  private Guess guess;

  Object onAction()

  {

    int target = random.nextInt(10) + 1;

    return guess.initialize(target);

  }

}

How can you have a public class named "Start" in a file named "Index.java"?

I tried creating a Start in "Start.java" but that did not work.



John



At some point (I don't know when exactly) index pages were introduced. On the package root, this is called Index. Apparently, the tutorial hasn't been updated completely. Of course it should be a class Index in the file Index.java with a corresponding Index.tml.

Cheers,

Uli

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to