You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2016/04/01 23:31:57 UTC

Re: Stateless AJAX in Wicket

https://cwiki.apache.org/confluence/display/WICKET/Ideas+for+Wicket+7.0#IdeasforWicket7.0-Betterstatelesssupport

The idea is not new. It just needs someone to push it!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Mar 29, 2016 at 4:37 PM, andrea del bene <an...@gmail.com>
wrote:

>
>
> In any case, +1 to add stateless AJAX to Wicket. I think it would be
> appreciated.
>
> All,
>>
>> I've done a small experiment with stateless ajax based on the code
>> from Jolira and ported it to wicket 7.
>>
>> It appears that stateless ajax actually works, and the code doesn't
>> look all that jarring to me. I understand that providing this
>> out-of-the-box, and as a default implementation is dangerous.
>>
>>
>> https://github.com/jolira/wicket-stateless/blob/master/stateless/src/main/java/com/google/code/joliratools/StatelessAjaxFormComponentUpdatingBehavior.java
>>
>> The only thing I had to fix was adding the following onBind method,
>> because Wicket's standard implementation doesn't perform this when
>> getStatelessHint() returns true:
>>
>> @Override
>> protected void onBind()
>> {
>>      super.onBind();
>>      getFormComponent().getBehaviorId(this);
>> }
>>
>> The other snag I ran into was that the components you want to replace
>> need to have a static markupId (not generated by Wicket).
>>
>> Is this something we want to add to wicket proper?
>>
>> Martijn
>>
>>
>>
>