You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2010/02/08 05:29:49 UTC

Loading properties file while using Spring @L

I use Wicket, Spring and wicket-spring extensions. Spring
configuration loads properties from config/env.properties file using
PropertyPlaceholderConfigurer. I would like to add more properties to
this file and read them from my Wicket application class. I tried to
inject a Spring Resource using @SpringBean annotation, but it doesn't
work in the my Wicket application class.

I am looking for recommendations on how to read properties files from
wicket application class. Ideally I would like to use a single
properties file read by Wicket and Spring.

Thanks,

Alec

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


Re: Loading properties file while using Spring @L

Posted by James Carman <jc...@carmanconsulting.com>.
I'm using both and they work fine.

On Mon, Feb 8, 2010 at 11:18 AM, Alec Swan <al...@gmail.com> wrote:
> Igor, were you suggesting the same approach as James did?
>
> If so, I am already using @SpringBean annotations and I am wondering
> if they will continue to work with the
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
> approach?
>
> Thanks.
>
> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> You can use the Spring integration to actually create your application
>> object for you:
>>
>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>
>> Then, you can wire in anything into it that you want, just like any
>> other Spring bean (because it *is* just another Spring bean)
>>
>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>> configuration loads properties from config/env.properties file using
>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>> this file and read them from my Wicket application class. I tried to
>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>> work in the my Wicket application class.
>>>
>>> I am looking for recommendations on how to read properties files from
>>> wicket application class. Ideally I would like to use a single
>>> properties file read by Wicket and Spring.
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Igor Vaynberg <ig...@gmail.com>.
personally, i use salve (salve.googlecode.com) so i can inject into
any object...

-igor

On Mon, Feb 8, 2010 at 5:28 PM, Alec Swan <al...@gmail.com> wrote:
> Igor, how do you inject the configuration bean in the Wicket
> application? Do you use
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
> approach?
>
> Thanks,
>
> Alec
>
> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>> i usually create a seperate bean that represents the properties and
>> let spring fill those in via the property configurer. then inject the
>> bean and you are done.
>>
>> -igor
>>
>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>> Igor, were you suggesting the same approach as James did?
>>>
>>> If so, I am already using @SpringBean annotations and I am wondering
>>> if they will continue to work with the
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>> approach?
>>>
>>> Thanks.
>>>
>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>> <jc...@carmanconsulting.com> wrote:
>>>> You can use the Spring integration to actually create your application
>>>> object for you:
>>>>
>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>
>>>> Then, you can wire in anything into it that you want, just like any
>>>> other Spring bean (because it *is* just another Spring bean)
>>>>
>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>> configuration loads properties from config/env.properties file using
>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>> this file and read them from my Wicket application class. I tried to
>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>> work in the my Wicket application class.
>>>>>
>>>>> I am looking for recommendations on how to read properties files from
>>>>> wicket application class. Ideally I would like to use a single
>>>>> properties file read by Wicket and Spring.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alec
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Igor Vaynberg <ig...@gmail.com>.
salve is a bytecode instrumentor that hooks into an existing ioc
container and makes injecting any object easy and serialization-safe.

-igor

On Mon, Feb 8, 2010 at 6:13 PM, Alec Swan <al...@gmail.com> wrote:
> Igor, I looked at Salve even though James suggestion will work for my
> small project.
>
> If I understood correctly Salve is an IoC container which can
> serialize objects with complex dependencies. I think this can be very
> useful when serializing Wicket components that depend on DAO or other
> types of services.
>
> Thanks!
>
> Alec
>
> On Mon, Feb 8, 2010 at 7:08 PM, Alec Swan <al...@gmail.com> wrote:
>> Thanks James, this is awesome! This is what I ended up doing in my
>> Wicket WebApplication object:
>>
>> @SpringBean(name = "myConfiguration")
>> private MyConfiguration myConfiguration;
>>
>> protected void init() {
>>        super.init();
>>
>>        // integrate with Spring
>>        addComponentInstantiationListener(new SpringComponentInjector(this));
>>        InjectorHolder.getInjector().inject(this); // injects
>> @SpringBean dependencies of this object
>> }
>>
>>
>> On Mon, Feb 8, 2010 at 6:52 PM, James Carman
>> <jc...@carmanconsulting.com> wrote:
>>> You can inject anything you like that's annotated with the @SpringBean
>>> annotations:
>>>
>>> InjectorHolder.getInjector().inject(someNonComponentObject);
>>>
>>> On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan <al...@gmail.com> wrote:
>>>> Andrew, I use @SpringBean annotations in Wicket components. How do you
>>>> use annotation-based approach to inject dependencies in the Wicket
>>>> application object?
>>>>
>>>> On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi <an...@mysticcoders.com> wrote:
>>>>> the annotation-based approach is the most often used on that page.
>>>>>
>>>>> On Feb 8, 2010, at 5:28 PM, Alec Swan wrote:
>>>>>
>>>>>> Igor, how do you inject the configuration bean in the Wicket
>>>>>> application? Do you use
>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>> approach?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>>> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>>>>>> i usually create a seperate bean that represents the properties and
>>>>>>> let spring fill those in via the property configurer. then inject the
>>>>>>> bean and you are done.
>>>>>>>
>>>>>>> -igor
>>>>>>>
>>>>>>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>>>>>>> Igor, were you suggesting the same approach as James did?
>>>>>>>>
>>>>>>>> If so, I am already using @SpringBean annotations and I am wondering
>>>>>>>> if they will continue to work with the
>>>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>>>> approach?
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>>>>>>> <jc...@carmanconsulting.com> wrote:
>>>>>>>>> You can use the Spring integration to actually create your application
>>>>>>>>> object for you:
>>>>>>>>>
>>>>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>>>>>
>>>>>>>>> Then, you can wire in anything into it that you want, just like any
>>>>>>>>> other Spring bean (because it *is* just another Spring bean)
>>>>>>>>>
>>>>>>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>>>>>>> configuration loads properties from config/env.properties file using
>>>>>>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>>>>>>> this file and read them from my Wicket application class. I tried to
>>>>>>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>>>>>>> work in the my Wicket application class.
>>>>>>>>>>
>>>>>>>>>> I am looking for recommendations on how to read properties files from
>>>>>>>>>> wicket application class. Ideally I would like to use a single
>>>>>>>>>> properties file read by Wicket and Spring.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Alec
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>
>>>>>
>>>>> To our success!
>>>>>
>>>>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>>>>>
>>>>> ANDREW LOMBARDI | andrew@mysticcoders.com
>>>>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
>>>>> ofc: 714-816-4488
>>>>> fax: 714-782-6024
>>>>> cell: 714-697-8046
>>>>> linked-in: http://www.linkedin.com/in/andrewlombardi
>>>>> twitter: http://www.twitter.com/kinabalu
>>>>>
>>>>> Eco-Tip: Printing e-mails is usually a waste.
>>>>>
>>>>> ========================================================
>>>>> This message is for the named person's use only. You must not, directly or indirectly, use,
>>>>>  disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
>>>>> ========================================================
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Alec Swan <al...@gmail.com>.
Igor, I looked at Salve even though James suggestion will work for my
small project.

If I understood correctly Salve is an IoC container which can
serialize objects with complex dependencies. I think this can be very
useful when serializing Wicket components that depend on DAO or other
types of services.

Thanks!

Alec

On Mon, Feb 8, 2010 at 7:08 PM, Alec Swan <al...@gmail.com> wrote:
> Thanks James, this is awesome! This is what I ended up doing in my
> Wicket WebApplication object:
>
> @SpringBean(name = "myConfiguration")
> private MyConfiguration myConfiguration;
>
> protected void init() {
>        super.init();
>
>        // integrate with Spring
>        addComponentInstantiationListener(new SpringComponentInjector(this));
>        InjectorHolder.getInjector().inject(this); // injects
> @SpringBean dependencies of this object
> }
>
>
> On Mon, Feb 8, 2010 at 6:52 PM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> You can inject anything you like that's annotated with the @SpringBean
>> annotations:
>>
>> InjectorHolder.getInjector().inject(someNonComponentObject);
>>
>> On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan <al...@gmail.com> wrote:
>>> Andrew, I use @SpringBean annotations in Wicket components. How do you
>>> use annotation-based approach to inject dependencies in the Wicket
>>> application object?
>>>
>>> On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi <an...@mysticcoders.com> wrote:
>>>> the annotation-based approach is the most often used on that page.
>>>>
>>>> On Feb 8, 2010, at 5:28 PM, Alec Swan wrote:
>>>>
>>>>> Igor, how do you inject the configuration bean in the Wicket
>>>>> application? Do you use
>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>> approach?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alec
>>>>>
>>>>> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>>>>> i usually create a seperate bean that represents the properties and
>>>>>> let spring fill those in via the property configurer. then inject the
>>>>>> bean and you are done.
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>>>>>> Igor, were you suggesting the same approach as James did?
>>>>>>>
>>>>>>> If so, I am already using @SpringBean annotations and I am wondering
>>>>>>> if they will continue to work with the
>>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>>> approach?
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>>>>>> <jc...@carmanconsulting.com> wrote:
>>>>>>>> You can use the Spring integration to actually create your application
>>>>>>>> object for you:
>>>>>>>>
>>>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>>>>
>>>>>>>> Then, you can wire in anything into it that you want, just like any
>>>>>>>> other Spring bean (because it *is* just another Spring bean)
>>>>>>>>
>>>>>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>>>>>> configuration loads properties from config/env.properties file using
>>>>>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>>>>>> this file and read them from my Wicket application class. I tried to
>>>>>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>>>>>> work in the my Wicket application class.
>>>>>>>>>
>>>>>>>>> I am looking for recommendations on how to read properties files from
>>>>>>>>> wicket application class. Ideally I would like to use a single
>>>>>>>>> properties file read by Wicket and Spring.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> Alec
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>>
>>>> To our success!
>>>>
>>>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>>>>
>>>> ANDREW LOMBARDI | andrew@mysticcoders.com
>>>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
>>>> ofc: 714-816-4488
>>>> fax: 714-782-6024
>>>> cell: 714-697-8046
>>>> linked-in: http://www.linkedin.com/in/andrewlombardi
>>>> twitter: http://www.twitter.com/kinabalu
>>>>
>>>> Eco-Tip: Printing e-mails is usually a waste.
>>>>
>>>> ========================================================
>>>> This message is for the named person's use only. You must not, directly or indirectly, use,
>>>>  disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
>>>> ========================================================
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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


Re: Loading properties file while using Spring @L

Posted by Alec Swan <al...@gmail.com>.
Thanks James, this is awesome! This is what I ended up doing in my
Wicket WebApplication object:

@SpringBean(name = "myConfiguration")
private MyConfiguration myConfiguration;

protected void init() {
        super.init();

        // integrate with Spring
        addComponentInstantiationListener(new SpringComponentInjector(this));
        InjectorHolder.getInjector().inject(this); // injects
@SpringBean dependencies of this object
}


On Mon, Feb 8, 2010 at 6:52 PM, James Carman
<jc...@carmanconsulting.com> wrote:
> You can inject anything you like that's annotated with the @SpringBean
> annotations:
>
> InjectorHolder.getInjector().inject(someNonComponentObject);
>
> On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan <al...@gmail.com> wrote:
>> Andrew, I use @SpringBean annotations in Wicket components. How do you
>> use annotation-based approach to inject dependencies in the Wicket
>> application object?
>>
>> On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi <an...@mysticcoders.com> wrote:
>>> the annotation-based approach is the most often used on that page.
>>>
>>> On Feb 8, 2010, at 5:28 PM, Alec Swan wrote:
>>>
>>>> Igor, how do you inject the configuration bean in the Wicket
>>>> application? Do you use
>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>> approach?
>>>>
>>>> Thanks,
>>>>
>>>> Alec
>>>>
>>>> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>>>> i usually create a seperate bean that represents the properties and
>>>>> let spring fill those in via the property configurer. then inject the
>>>>> bean and you are done.
>>>>>
>>>>> -igor
>>>>>
>>>>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>>>>> Igor, were you suggesting the same approach as James did?
>>>>>>
>>>>>> If so, I am already using @SpringBean annotations and I am wondering
>>>>>> if they will continue to work with the
>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>> approach?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>>>>> <jc...@carmanconsulting.com> wrote:
>>>>>>> You can use the Spring integration to actually create your application
>>>>>>> object for you:
>>>>>>>
>>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>>>
>>>>>>> Then, you can wire in anything into it that you want, just like any
>>>>>>> other Spring bean (because it *is* just another Spring bean)
>>>>>>>
>>>>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>>>>> configuration loads properties from config/env.properties file using
>>>>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>>>>> this file and read them from my Wicket application class. I tried to
>>>>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>>>>> work in the my Wicket application class.
>>>>>>>>
>>>>>>>> I am looking for recommendations on how to read properties files from
>>>>>>>> wicket application class. Ideally I would like to use a single
>>>>>>>> properties file read by Wicket and Spring.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Alec
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>> To our success!
>>>
>>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>>>
>>> ANDREW LOMBARDI | andrew@mysticcoders.com
>>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
>>> ofc: 714-816-4488
>>> fax: 714-782-6024
>>> cell: 714-697-8046
>>> linked-in: http://www.linkedin.com/in/andrewlombardi
>>> twitter: http://www.twitter.com/kinabalu
>>>
>>> Eco-Tip: Printing e-mails is usually a waste.
>>>
>>> ========================================================
>>> This message is for the named person's use only. You must not, directly or indirectly, use,
>>>  disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
>>> ========================================================
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by James Carman <jc...@carmanconsulting.com>.
You can inject anything you like that's annotated with the @SpringBean
annotations:

InjectorHolder.getInjector().inject(someNonComponentObject);

On Mon, Feb 8, 2010 at 8:46 PM, Alec Swan <al...@gmail.com> wrote:
> Andrew, I use @SpringBean annotations in Wicket components. How do you
> use annotation-based approach to inject dependencies in the Wicket
> application object?
>
> On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi <an...@mysticcoders.com> wrote:
>> the annotation-based approach is the most often used on that page.
>>
>> On Feb 8, 2010, at 5:28 PM, Alec Swan wrote:
>>
>>> Igor, how do you inject the configuration bean in the Wicket
>>> application? Do you use
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>> approach?
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>>> i usually create a seperate bean that represents the properties and
>>>> let spring fill those in via the property configurer. then inject the
>>>> bean and you are done.
>>>>
>>>> -igor
>>>>
>>>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>>>> Igor, were you suggesting the same approach as James did?
>>>>>
>>>>> If so, I am already using @SpringBean annotations and I am wondering
>>>>> if they will continue to work with the
>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>> approach?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>>>> <jc...@carmanconsulting.com> wrote:
>>>>>> You can use the Spring integration to actually create your application
>>>>>> object for you:
>>>>>>
>>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>>
>>>>>> Then, you can wire in anything into it that you want, just like any
>>>>>> other Spring bean (because it *is* just another Spring bean)
>>>>>>
>>>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>>>> configuration loads properties from config/env.properties file using
>>>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>>>> this file and read them from my Wicket application class. I tried to
>>>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>>>> work in the my Wicket application class.
>>>>>>>
>>>>>>> I am looking for recommendations on how to read properties files from
>>>>>>> wicket application class. Ideally I would like to use a single
>>>>>>> properties file read by Wicket and Spring.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Alec
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>> To our success!
>>
>> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>>
>> ANDREW LOMBARDI | andrew@mysticcoders.com
>> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
>> ofc: 714-816-4488
>> fax: 714-782-6024
>> cell: 714-697-8046
>> linked-in: http://www.linkedin.com/in/andrewlombardi
>> twitter: http://www.twitter.com/kinabalu
>>
>> Eco-Tip: Printing e-mails is usually a waste.
>>
>> ========================================================
>> This message is for the named person's use only. You must not, directly or indirectly, use,
>>  disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
>> ========================================================
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Alec Swan <al...@gmail.com>.
Andrew, I use @SpringBean annotations in Wicket components. How do you
use annotation-based approach to inject dependencies in the Wicket
application object?

On Mon, Feb 8, 2010 at 6:30 PM, Andrew Lombardi <an...@mysticcoders.com> wrote:
> the annotation-based approach is the most often used on that page.
>
> On Feb 8, 2010, at 5:28 PM, Alec Swan wrote:
>
>> Igor, how do you inject the configuration bean in the Wicket
>> application? Do you use
>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>> approach?
>>
>> Thanks,
>>
>> Alec
>>
>> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>> i usually create a seperate bean that represents the properties and
>>> let spring fill those in via the property configurer. then inject the
>>> bean and you are done.
>>>
>>> -igor
>>>
>>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>>> Igor, were you suggesting the same approach as James did?
>>>>
>>>> If so, I am already using @SpringBean annotations and I am wondering
>>>> if they will continue to work with the
>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>> approach?
>>>>
>>>> Thanks.
>>>>
>>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>>> <jc...@carmanconsulting.com> wrote:
>>>>> You can use the Spring integration to actually create your application
>>>>> object for you:
>>>>>
>>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>>>
>>>>> Then, you can wire in anything into it that you want, just like any
>>>>> other Spring bean (because it *is* just another Spring bean)
>>>>>
>>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>>> configuration loads properties from config/env.properties file using
>>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>>> this file and read them from my Wicket application class. I tried to
>>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>>> work in the my Wicket application class.
>>>>>>
>>>>>> I am looking for recommendations on how to read properties files from
>>>>>> wicket application class. Ideally I would like to use a single
>>>>>> properties file read by Wicket and Spring.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> To our success!
>
> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>
> ANDREW LOMBARDI | andrew@mysticcoders.com
> 2321 E 4th St. Ste C-128, Santa Ana CA 92705
> ofc: 714-816-4488
> fax: 714-782-6024
> cell: 714-697-8046
> linked-in: http://www.linkedin.com/in/andrewlombardi
> twitter: http://www.twitter.com/kinabalu
>
> Eco-Tip: Printing e-mails is usually a waste.
>
> ========================================================
> This message is for the named person's use only. You must not, directly or indirectly, use,
>  disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
> ========================================================
>
>

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


Re: Loading properties file while using Spring @L

Posted by Andrew Lombardi <an...@mysticcoders.com>.
the annotation-based approach is the most often used on that page.

On Feb 8, 2010, at 5:28 PM, Alec Swan wrote:

> Igor, how do you inject the configuration bean in the Wicket
> application? Do you use
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
> approach?
> 
> Thanks,
> 
> Alec
> 
> On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>> i usually create a seperate bean that represents the properties and
>> let spring fill those in via the property configurer. then inject the
>> bean and you are done.
>> 
>> -igor
>> 
>> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>>> Igor, were you suggesting the same approach as James did?
>>> 
>>> If so, I am already using @SpringBean annotations and I am wondering
>>> if they will continue to work with the
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>> approach?
>>> 
>>> Thanks.
>>> 
>>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>>> <jc...@carmanconsulting.com> wrote:
>>>> You can use the Spring integration to actually create your application
>>>> object for you:
>>>> 
>>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>> 
>>>> Then, you can wire in anything into it that you want, just like any
>>>> other Spring bean (because it *is* just another Spring bean)
>>>> 
>>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>>> configuration loads properties from config/env.properties file using
>>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>>> this file and read them from my Wicket application class. I tried to
>>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>>> work in the my Wicket application class.
>>>>> 
>>>>> I am looking for recommendations on how to read properties files from
>>>>> wicket application class. Ideally I would like to use a single
>>>>> properties file read by Wicket and Spring.
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Alec
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>> 
>>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>> 
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | andrew@mysticcoders.com
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.

========================================================
This message is for the named person's use only. You must not, directly or indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not the intended recipient.
========================================================


Re: Loading properties file while using Spring @L

Posted by Alec Swan <al...@gmail.com>.
Igor, how do you inject the configuration bean in the Wicket
application? Do you use
http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
approach?

Thanks,

Alec

On Mon, Feb 8, 2010 at 10:33 AM, Igor Vaynberg <ig...@gmail.com> wrote:
> i usually create a seperate bean that represents the properties and
> let spring fill those in via the property configurer. then inject the
> bean and you are done.
>
> -igor
>
> On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
>> Igor, were you suggesting the same approach as James did?
>>
>> If so, I am already using @SpringBean annotations and I am wondering
>> if they will continue to work with the
>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>> approach?
>>
>> Thanks.
>>
>> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
>> <jc...@carmanconsulting.com> wrote:
>>> You can use the Spring integration to actually create your application
>>> object for you:
>>>
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>>
>>> Then, you can wire in anything into it that you want, just like any
>>> other Spring bean (because it *is* just another Spring bean)
>>>
>>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>>> configuration loads properties from config/env.properties file using
>>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>>> this file and read them from my Wicket application class. I tried to
>>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>>> work in the my Wicket application class.
>>>>
>>>> I am looking for recommendations on how to read properties files from
>>>> wicket application class. Ideally I would like to use a single
>>>> properties file read by Wicket and Spring.
>>>>
>>>> Thanks,
>>>>
>>>> Alec
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Igor Vaynberg <ig...@gmail.com>.
i usually create a seperate bean that represents the properties and
let spring fill those in via the property configurer. then inject the
bean and you are done.

-igor

On Mon, Feb 8, 2010 at 8:18 AM, Alec Swan <al...@gmail.com> wrote:
> Igor, were you suggesting the same approach as James did?
>
> If so, I am already using @SpringBean annotations and I am wondering
> if they will continue to work with the
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
> approach?
>
> Thanks.
>
> On Mon, Feb 8, 2010 at 4:41 AM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> You can use the Spring integration to actually create your application
>> object for you:
>>
>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>>
>> Then, you can wire in anything into it that you want, just like any
>> other Spring bean (because it *is* just another Spring bean)
>>
>> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>>> I use Wicket, Spring and wicket-spring extensions. Spring
>>> configuration loads properties from config/env.properties file using
>>> PropertyPlaceholderConfigurer. I would like to add more properties to
>>> this file and read them from my Wicket application class. I tried to
>>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>>> work in the my Wicket application class.
>>>
>>> I am looking for recommendations on how to read properties files from
>>> wicket application class. Ideally I would like to use a single
>>> properties file read by Wicket and Spring.
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Alec Swan <al...@gmail.com>.
Igor, were you suggesting the same approach as James did?

If so, I am already using @SpringBean annotations and I am wondering
if they will continue to work with the
http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
approach?

Thanks.

On Mon, Feb 8, 2010 at 4:41 AM, James Carman
<jc...@carmanconsulting.com> wrote:
> You can use the Spring integration to actually create your application
> object for you:
>
> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach
>
> Then, you can wire in anything into it that you want, just like any
> other Spring bean (because it *is* just another Spring bean)
>
> On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
>> I use Wicket, Spring and wicket-spring extensions. Spring
>> configuration loads properties from config/env.properties file using
>> PropertyPlaceholderConfigurer. I would like to add more properties to
>> this file and read them from my Wicket application class. I tried to
>> inject a Spring Resource using @SpringBean annotation, but it doesn't
>> work in the my Wicket application class.
>>
>> I am looking for recommendations on how to read properties files from
>> wicket application class. Ideally I would like to use a single
>> properties file read by Wicket and Spring.
>>
>> Thanks,
>>
>> Alec
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by James Carman <jc...@carmanconsulting.com>.
You can use the Spring integration to actually create your application
object for you:

http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach

Then, you can wire in anything into it that you want, just like any
other Spring bean (because it *is* just another Spring bean)

On Sun, Feb 7, 2010 at 11:29 PM, Alec Swan <al...@gmail.com> wrote:
> I use Wicket, Spring and wicket-spring extensions. Spring
> configuration loads properties from config/env.properties file using
> PropertyPlaceholderConfigurer. I would like to add more properties to
> this file and read them from my Wicket application class. I tried to
> inject a Spring Resource using @SpringBean annotation, but it doesn't
> work in the my Wicket application class.
>
> I am looking for recommendations on how to read properties files from
> wicket application class. Ideally I would like to use a single
> properties file read by Wicket and Spring.
>
> Thanks,
>
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Loading properties file while using Spring @L

Posted by Igor Vaynberg <ig...@gmail.com>.
map the properties to a bean and inject that

-igor

On Sunday, February 7, 2010, Alec Swan <al...@gmail.com> wrote:
> I use Wicket, Spring and wicket-spring extensions. Spring
> configuration loads properties from config/env.properties file using
> PropertyPlaceholderConfigurer. I would like to add more properties to
> this file and read them from my Wicket application class. I tried to
> inject a Spring Resource using @SpringBean annotation, but it doesn't
> work in the my Wicket application class.
>
> I am looking for recommendations on how to read properties files from
> wicket application class. Ideally I would like to use a single
> properties file read by Wicket and Spring.
>
> Thanks,
>
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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