You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kristian Marinkovic <kr...@porsche.co.at> on 2007/04/13 12:09:42 UTC

T5: Loop with @Component does not work

hi, 

could someone help me to apply a T5 Loop with the
@Component annotation? The following code does 
not work.... all the necessary getter/setter methods are
in place (modification of T5 tutorial).

... or maybe the Loop is not meant to be used this way :)

g,
kris

<span t:id="looping">
        <a t:type="actionlink" context="index">${index}</a>
</span>

@Component(parameters={"source=range","value=index"})
public Loop looping;
 
private static List<String> range = new ArrayList<String>();
static {
   range.add("1");
   range.add("2");
   range.add("3");
}

Re: T5: Loop with @Component does not work

Posted by Howard Lewis Ship <hl...@gmail.com>.
I often have to add @SuppressWarnings("unused") to the field which
defines the component as well.

On 4/13/07, Robert Zeigler <ro...@scazdl.org> wrote:
> Right.  Annotations on properties will only be processed if the
> properties are private.
> In fact, for components, unless you're going to access the component
> externally, you don't need a getter.
>
>
>
> On Apr 13, 2007, at 4/135:50 AM , Kristian Marinkovic wrote:
>
> > hi all,
> >
> > sorry for my previous post.... of course it works!!
> >
> > my failure was that i had the Loop as public property
> > without a getter method... if you do so you get an Error
> > message in your log you should read :)
> >
> > g,
> > kris
> >
> >
> >
> >
> > Kristian Marinkovic <kr...@porsche.co.at>
> > 13.04.2007 12:09
> > Bitte antworten an
> > "Tapestry users" <us...@tapestry.apache.org>
> >
> >
> > An
> > "Tapestry users" <us...@tapestry.apache.org>
> > Kopie
> >
> > Thema
> > T5: Loop with @Component does not work
> >
> >
> >
> >
> >
> >
> > hi,
> >
> > could someone help me to apply a T5 Loop with the
> > @Component annotation? The following code does
> > not work.... all the necessary getter/setter methods are
> > in place (modification of T5 tutorial).
> >
> > ... or maybe the Loop is not meant to be used this way :)
> >
> > g,
> > kris
> >
> > <span t:id="looping">
> >         <a t:type="actionlink" context="index">${index}</a>
> > </span>
> >
> > @Component(parameters={"source=range","value=index"})
> > public Loop looping;
> >
> > private static List<String> range = new ArrayList<String>();
> > static {
> >    range.add("1");
> >    range.add("2");
> >    range.add("3");
> > }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: T5: Loop with @Component does not work

Posted by Robert Zeigler <ro...@scazdl.org>.
Right.  Annotations on properties will only be processed if the  
properties are private.
In fact, for components, unless you're going to access the component  
externally, you don't need a getter.



On Apr 13, 2007, at 4/135:50 AM , Kristian Marinkovic wrote:

> hi all,
>
> sorry for my previous post.... of course it works!!
>
> my failure was that i had the Loop as public property
> without a getter method... if you do so you get an Error
> message in your log you should read :)
>
> g,
> kris
>
>
>
>
> Kristian Marinkovic <kr...@porsche.co.at>
> 13.04.2007 12:09
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> "Tapestry users" <us...@tapestry.apache.org>
> Kopie
>
> Thema
> T5: Loop with @Component does not work
>
>
>
>
>
>
> hi,
>
> could someone help me to apply a T5 Loop with the
> @Component annotation? The following code does
> not work.... all the necessary getter/setter methods are
> in place (modification of T5 tutorial).
>
> ... or maybe the Loop is not meant to be used this way :)
>
> g,
> kris
>
> <span t:id="looping">
>         <a t:type="actionlink" context="index">${index}</a>
> </span>
>
> @Component(parameters={"source=range","value=index"})
> public Loop looping;
>
> private static List<String> range = new ArrayList<String>();
> static {
>    range.add("1");
>    range.add("2");
>    range.add("3");
> }


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


RE: T5: Loop with @Component does not work

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
hi all,

sorry for my previous post.... of course it works!!

my failure was that i had the Loop as public property 
without a getter method... if you do so you get an Error
message in your log you should read :)

g,
kris




Kristian Marinkovic <kr...@porsche.co.at> 
13.04.2007 12:09
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
"Tapestry users" <us...@tapestry.apache.org>
Kopie

Thema
T5: Loop with @Component does not work






hi, 

could someone help me to apply a T5 Loop with the
@Component annotation? The following code does 
not work.... all the necessary getter/setter methods are
in place (modification of T5 tutorial).

... or maybe the Loop is not meant to be used this way :)

g,
kris

<span t:id="looping">
        <a t:type="actionlink" context="index">${index}</a>
</span>

@Component(parameters={"source=range","value=index"})
public Loop looping;
 
private static List<String> range = new ArrayList<String>();
static {
   range.add("1");
   range.add("2");
   range.add("3");
}