Hi,

On Fri, Apr 12, 2013 at 3:41 PM, Merlijn <lucas...@gmail.com> wrote:

> Hi everybody,
>
> I have a dropdown panel that opens when a user enters something inside a
> textfield. The problem is that when the panel is open and the user goes to
> another page, if the back button is then used to go back to the page, the
> panel is still open.
>
> Now I fixed it by having a AjaxFormComponentUpdatingBehavior that invokes
> on
> blur, which clears the panel. But the problem with is that it now does an
> Ajax call whenever an onblur event happens.
>
> I also tried doing it in Javascript, setting the panel to display = 'none'
> but that does not work. Does anyone know a good solution without using
> Ajax?
>

Wicket also uses JavaScript to "remove" it so it should work.

Alternatively you can use OnDomReady JavaScript to initialize it. This way
it the JS will be executed just once at page load time.


>
> Thanks and kind regards,
>
> Merlijn
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Clearing-panel-when-leaving-page-tp4657929.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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

Reply via email to