Hi, On Tue, May 26, 2015 at 11:59 AM, avchavan <[email protected]> wrote:
> I have to show the datepicker inside a modal window. > The modal window is hidden by default unless someone clicks on the link > which makes the modal window visible. > I guess you mean wicket default modal? > Because of the initial invisibility the javascript file doesnt load and > that > in turn makes the datepicker functionality to not work. There is some code > written inside the javascript file that adds few html divs in the parent > html structure for datepicker icon etc. > The only solution i can think of is to refresh the page after the modal > window becomes visible (which i feel is not the correct thing to do, but it > works, after the refresh the datepicker javascript gets loaded and the > functionality works as expected). > 1- Make initial content of modal an EmptyPanel 2- On the same AjaxRequest you use to show the modal... Replace that empty panel with a panel having your date picker. The wicket should call the JavaScript building your date picker as part of the contribution of new (AJAX) content. This is a completely normal/date to day use case and there is no need to do anything complex to achieve this. > > Is there a work around for achieving something like this? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Change-state-of-component-after-page-rendering-tp4670900p4670913.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] > > -- Regards - Ernesto Reinaldo Barreiro
