I've created a quickstart and provided it in:

https://issues.apache.org/jira/browse/WICKET-4875

Regards,
Chris

>-----Original Message-----
>From: Martin Grigorov [mailto:[email protected]]
>Sent: Thursday, 22 November 2012 12:38 AM
>To: [email protected]
>Subject: Re: Wicket 6 changes to AjaxLink causing problem
>
>Hi,
>
>Can you show your code related to the issue ?
>
>
>On Wed, Nov 21, 2012 at 3:21 PM, Chris Colman
><[email protected]>wrote:
>
>> I'm porting a large app from 1.5 to 1.6 and have come across a
problem
>> with AjaxLinkS not triggering their onClick when inside components
that
>> are added dynamically via an implementation of the IComponentResolver
>> interface.
>>
>> I found this in the Wicket in Action book:
>>
>>
>> Event registration
>>
>> Until version 1.5.x attaching an Ajax event behavior to a component
>> would lead to addition of an inline attribute to the markup of this
>> component. For example the produced markup for an AjaxLink is similar
>> to:
>> <a id="linkId" onclick="wicketAjaxGet('some/url')">Link</a>
>> In Wicket 6 JavaScript event registration is being used instead. For
>> example the above becomes:
>> <head>
>>   ...
>>   <script>
>>     Wicket.Event.add(window, 'domready', function(event) {
>>       Wicket.Ajax.get({'u': 'some/url', 'c': 'linkId', 'e':
'click'}));
>>       // ... more event registrations and onDomReady scripts
>>     });
>>   </script>
>> </head>
>> ...
>> <a id="linkId">Link</a>
>>
>> I'm assuming that, being generated in the <head> this event
registration
>> code happens for all components that are added explicitly but not for
>> any components that are added dynamically by the component resolver.
>>
>> If this is correct, is it possible to get the event registration to
>> occur for dynamically added components? If not is it possibly that
>> dynamically added components could revert to working back in pre 1.6
>> mode? i.e.  the appropriate JS code is placed in the link itself:
>>
>> <a id="linkId" onclick="wicketAjaxGet('some/url')">Link</a>
>>
>> Regards,
>> Chris
>>
>
>
>
>--
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com <http://jweekend.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to