As I recall, it had something to do with the IoC having an issue
identifying symbol injection with String value types without
additional information.

Kalle


On Sun, Oct 17, 2010 at 10:41 PM, Alessio Gambi <agamb...@gmail.com> wrote:
> Hi,
>
> I solved this by adding the @Inject annotation. BTW, why something @Symbol
> annotation is used without the @Inject and other time they are coupled ?
>
> Thanks.
> -- Alessio
>
> On Oct 18, 2010, at 7:30 AM, Alessio Gambi wrote:
>
>> Hi,
>>
>> I am using Tapestry 5.0.1.5 and I have problem with using Symbols.
>>
>> In a service, I need the version of tapestry currently run, so I injected
>> the TAPESTRY_VERSION symbol in the service constructor (see the code below)
>>
>> public class MyComponentEventResultProcessor implements
>> ComponentEventResultProcessor
>>
>>        private String tapestryVersion;
>>        final RequestGlobals requestGlobals
>>
>>        public MyComponentEventResultProcessor(RequestGlobals
>> requestGlobals, @Symbol(SymbolConstants.TAPESTRY_VERSION) String
>> tapestryVersion) {
>>                this.requestGlobals = requestGlobals;
>>                this.tapestryVersion = tapestryVersion;
>>        }
>>
>>        public void processResultValue(Object value) throws IOException {
>>
>>  System.out.println("MyComponentEventResultProcessor.processResultValue()
>> tapestryVersion = "+ tapestryVersion );
>>        ...
>>        }
>> ...
>> }
>>
>> When the service method is called, then the output in the console is not
>> what I expected:
>>
>> MyComponentEventResultProcessor.processResultValue() tapestryVersion =
>> MyComponentEventResultProcessor
>>
>>
>> The service is used to advice the AjaxComponentEventResultProcessor:
>> @Match("*ComponentEventResultProcessor")
>>        public static void adviseAjaxRequest(
>>                        MethodAdviceReceiver receiver,
>>                        final RequestGlobals requestGlobals,
>>                        final MyComponentEventResultProcessor
>> myComponentEventResultProcessor) {
>>
>> Did I do something wrong ? How can I solve/workaround this ?
>>
>> Thank you.
>>
>> -- Alessio
>
>

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

Reply via email to