You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Merlijn <lu...@gmail.com> on 2013/04/12 14:41:21 UTC
Clearing panel when leaving page
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?
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Clearing panel when leaving page
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
On Fri, Apr 12, 2013 at 3:41 PM, Merlijn <lu...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>