code: @Override
  	public void renderHead(IHeaderResponse response) {
  		super.renderHead(response);
  		
  		StringBuilder sb = new StringBuilder();
  		if(container.isVisible()) sb.append("$('#"+BootstrapModal.this.getMarkupId()+"').modal('show');");
  		else sb.append("$('#"+BootstrapModal.this.getMarkupId()+"').modal('hide');");
  		response.render(OnDomReadyHeaderItem.forScript(sb.toString()));
  	}
docs: /* (non-Javadoc)
  @see org.apache.wicket.Component#renderHead(org.apache.wicket.markup.head.IHeaderResponse)