I'm building a website with wicket. I have a modal window that opens from an ajaxlink from the main page. The problem is that when I added a CSS to my HTML code in order to make it more visible attractive, it stopped working. So now, when I click in the AjaxLink that opens the modal window, nothing happens and I can't figure out why. Any Ideas??
This is the code of the AjaxLink:
AjaxLink privacyLink = new AjaxLink<Void>("privacylink") {
@Override
public void onClick(AjaxRequestTarget target) {
// TODO Auto-generated method stub
modal2.show(target);
}
};
One more comment. This AjaxLink is introduced as a part of a ListView, so actually there are multiple AjaxLinks.
In order for the AjaxLink to refresh you will need to call something along the lines of:
Where modal2 is the component that you want to control the visibility of, and modal2Container is a WebMarkupContainer with .setOutputMarkupId(true) that modal2 is added to when the page/panel is constructed.
I have found the examples at http://www.wicket-library.com/wicket-examples-1.4.x/ajax/ to be particularly useful (I'm using 1.4, but there are other examples for whichever version of wicket you are running you can get to from http://wicketstuff.org/).
I finally found the solution!!, It was a problem of the version of jQuery that I was using (1.4.2) so I just changed it to 1.5.2 and it worked!