How to autosize a ModalWindow in wicket which is depend on content
-
26-05-2021 - |
Question
i am working on modalwindow but it does not autosizes when content of this
window getting increased
Also tell how to set scrollbar to Modalwindow if size of
content is more.
I want modalwindow autosizable please tell me simple code how to do
this??
& what is the actual use of setOutputMarkupId(true)???
final ModalWindow modalpostyourView=new ModalWindow("modalpostyourView");
modalpostyourView.setPageMapName("modalpostyourView-1");
modalpostyourView.setCookieName("modalpostyourView-1");
modalpostyourView.setWidthUnit("");
add(modalpostyourView);
modalpostyourView.setPageCreator(new ModalWindow.PageCreator()
{
@Override
public Page createPage()
{
return new UserPost(ForumForm.this,modalpostyourView);
}
});
AjaxLink postyourView=new AjaxLink("postyourView")
{
@Override
public void onClick(AjaxRequestTarget target)
{
modalpostyourView.show(target);
}
};
add(postyourView);
Solution
See https://github.com/wicketstuff/core/wiki/ModalX. This project provides extension of ModalWindow that supports that feature.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow