I am wondering why do we need annotations/XDoclet comments for trivial cases?
Let me explain: - Firstly, if there is an abstract method in the page/component class it means that the method is for Tapestry to enhance; - Secondly the method signature specifies type of object we need; If the method has no persistence parameters defined as annotation or in xml config then those two pieces of information are enough to inject proper object in the majority of cases. If there is an ambiguity then Tapestry may demand a clarification via annotations or XML config. Lets look at the common stuff: @InjectObject("service:tapestry.globals.WebRequest") public abstract WebRequest getWebRequest(); @InjectObject("service:tapestry.globals.ServletContext") public abstract ServletContext getServletContext(); Is there any ambiguity in what we want to inject? I do not think so. I am pretty sure that having just abstract methods in the page/component class should be enough for Tapestry to inject necessary objects: public abstract WebRequest getWebRequest(); public abstract ServletContext getServletContext(); Any comments Howard? --- Paolo Donà <[EMAIL PROTECTED]> wrote: > I'm writing an xdoclet2 plugin to avoid writing > .page and .jwc files. > Don't know if that can help... you write xdoclet > tags instead of jdk5 > annotations. > go to http://xdoclet.codehaus.org/Tapestry+plugin if > interested. > > Paolo > > However, this is a repetitive piece of code that I > want to avoid. > > [cut] > > > However, I can not use JDK 1.5 yet and the only > way to do this, as I > > understand, is to inject Page Class properties in > the page > > specification. > > > > Since I am lazy ;-) and want to avoid this > repetitive pieces of XML, > > [cut] > Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]