wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pratibha <pratibha.pari...@gmail.com>
Subject Re: how to call modal window on link
Date Thu, 27 Oct 2016 12:08:04 GMT
I am trying to call modal window but this is not working my code is

@Override
			public void onClick() {

				confirmModal.add(new OpenWindowOnLoadBehavior());
			      confirmModal.setPageCreator(new ModalWindow.PageCreator() {
	            @Override
	            public Page createPage() {
	                return new RedirectPage("http://www.google.com");
	            }
	        });
				}

public class OpenWindowOnLoadBehavior extends AbstractDefaultAjaxBehavior {
  @Override
  protected void respond(AjaxRequestTarget target) {
      ModalWindow window = (ModalWindow) getComponent();
      window.show(target);
  }
  @Override
  public void renderHead(final Component component, IHeaderResponse
response) {
  
      *response.renderOnLoadJavascript(getCallbackScript().toString());*
  }

Please help me with this.

Thanks
	


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-call-modal-window-on-link-tp4675882p4675907.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


Mime
View raw message