#: Stefan Arentz changed the world a bit at a time by saying on 10/25/2005
9:58 PM :#
On Oct 25, 2005, at 10:48 PM, Alexandru Popescu wrote:
#: Stefan Arentz changed the world a bit at a time by saying on
10/25/2005 9:32 PM :#
On Oct 25, 2005, at 10:23 PM, Alexandru Popescu wrote:
Stefan I was wondering why annotating the field? At the first
glance it looks the logical choice, but imo the page is the
object depending on the service (so the annotation should be on
type level).
What do you mean with type level? The HelloWorldPage?
S.
yep :-). isn't this the way you name an annotations at a `class´
level? (java.lang.annotation.ElementType.TYPE)
Yup. But I don't see how this would work. How would you specify this
one for example:
<bean name="blueImageRenderer" class="ImageRendererImpl">
<property name="color" value="blue"/>
</bean>
<bean name="yellowImageRenderer" class="ImageRendererImpl">
<property name="color" value="yellow"/>
</bean>
public class FooPage extends WebPage
{
@SpringBeanReference("blueImageRenderer")
transient private ImageRenderer blueImageRenderer;
public setBlueImageRenderer(ImageRenderer blueImageRenderer) {
this. blueImageRenderer = blueImageRenderer;
}
@SpringBeanReference("yellowImageRenderer")
transient private ImageRenderer yellowImageRenderer;
public setYellowImageRenderer(ImageRenderer yellowImageRenderer) {
this. yellowImageRenderer = yellowImageRenderer;
}
}
I know it is a silly example :-)
I'm not sure how you would do this on the class level. The annotation
there then would have to get both bean name and property names in an
array of pair. Makes no sense to me.
S.
Fair enough :-). Doing some kind of autodiscovery doesn't make sense to me
neither.
I am waiting with interest to see your whole stuff online.
./alex
--
.w( the_mindstorm )p.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user