Hi,

Just use an AjaxLink that shows the "Loading..." div element in beforeSend
handler (IAjaxCallListener) and replace it with the real panel within the
Ajax response.
It is normal Wicket Ajax replacement.


On Wed, Apr 10, 2013 at 11:52 AM, pureza <[email protected]> wrote:

> Hi,
>
> I am using a bootstrap dropdown
> (http://twitter.github.io/bootstrap/javascript.html#dropdowns) and I want
> its submenu to load only when the user clicks the dropdown, because its
> contents are expensive to retrieve.
>
> To be more concrete, this is the behavior that I'm looking for: when the
> user first clicks the dropdown, I want to just show "Loading..." in the
> submenu. At the same time, I want to initiate the retrieval of the real
> submenu's options asynchronously. When these options have been retrieved
> (possibly many seconds later), I want to replace "Loading..." with them.
>
> I am a bit lost as to how to do this. I'm unsure as to whether I should use
> an AjaxLazyLoadPanel or an AbstractAjaxTimerBehavior or something else. Any
> recommendations or any example code that I could learn from?
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Loading-the-contents-of-an-expensive-panel-asynchronously-tp4657864.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to