Hi Sebastien,

On Wed, Jul 8, 2015 at 10:04 PM, Sebastien <[email protected]> wrote:

> Hi,
>
> Sorry, little bit late on the topic...
>
> On Fri, Jul 3, 2015 at 7:38 AM, Martin Grigorov <[email protected]>
> wrote:
>
>> HI Maxim,
>>
>> This will lead to a big API break.
>> If we change this signature then we will have to change many more to keep
>> it consistent, and this will lead to a lot of work for the application
>> developers to change AjaxRequestTarget with IPartialPageRequestHandler.
>>
>
> That's exactly the point I am worrying about... All signatures have to be
> checked to see whether or not it's an AjaxRequestTarget usage only or a
> method that can works with websockets too (and then change the signature to
> IPartialPageRequestHandler)... With the same idea,
> IListener/AbstractListener are part of ART. But #add(Component...) is part
> of IPartialPageRequestHandler, so adding a component via websocket will not
> trigger IListener#onBeforeRespond (1) ? This would probably lead to some
> unexpected behaviors, like for instance in Wicket jQuery UI where there is
> a "DestroyListener" (which handles the jquery #destroy of the widget)...
>
> Am I accurate on the analysis or did I missed a point?
>

You are correct!
But this is the case even now (in Wicket 6.x) because
WebSocketRequestHandler has empty implementations of the listener related
methods:
https://github.com/apache/wicket/blob/wicket-6.x/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/WebSocketRequestHandler.java#L72-L82

There is a workaround though - it is very easy to create AjaxRequestHandler
out of IPartialPageRequestHandler and use it when this is needed.


>
> Thanks & best regards,
> Sebastien.
>
> (1) actually I never double checked this is the case, but on the
> principle/theoretically I guess it should be...
>
>
>
>>
>> We may need to make this change for Wicket 8.x if there are many users
>> wanting this change, but for now I'd suggest you to create an adapter.
>>
>> Martin Grigorov
>> Freelancer. Available for hire!
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Fri, Jul 3, 2015 at 7:46 AM, Maxim Solodovnik <[email protected]>
>> wrote:
>>
>>> Hello Martin,
>>>
>>> I guess following method need to be additionally updated:
>>>
>>> org.apache.wicket.ajax.AbstractAjaxTimerBehavior.onTimer
>>>
>>> On Thu, Jul 2, 2015 at 6:11 PM, Martin Grigorov <[email protected]>
>>> wrote:
>>>
>>> > The change is rather big:
>>> >
>>> >
>>> https://github.com/sebfz1/wicket-jquery-ui/commit/e94f89d8f07f2b1af2b327a4aaec5ddd4b1400af
>>> > I guess many other methods will need to be changed too if one needs to
>>> use
>>> > them with WebSocket.
>>> > The improvement in the Wicket API looked so innocent ...
>>> >
>>> > Martin Grigorov
>>> > Freelancer. Available for hire!
>>> > Wicket Training and Consulting
>>> > https://twitter.com/mtgrigorov
>>> >
>>>
>>

Reply via email to