#: Stefan Arentz changed the world a bit at a time by saying on 10/26/2005
6:44 AM :#
On Oct 26, 2005, at 12:39 AM, Alexandru Popescu wrote:
#: 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.
What I can do is make:
@SpringBeanReference
transient Foo blueFoo;
default to a bean named 'blueFoo'. It helps a little bit to stop
repeating identifier names :-)
S.
Don't think it's worth the effort, as a renaming refactoring will break the
application :-).
./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
-------------------------------------------------------
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