Wicket Adding a draggable DialogBox with user defined tetarea, textbox and button

I am pretty new to Apache Wicket. I was able to get a home page, a form accepting inputs and then final success page where all accepted inputs are displayed. When this success page loads, there is a button. I would like to show a draggable dialog box with a textbox or a text area with when the button is clicked. I was trying to execute the JQuery extensions for wicket. But not able to get it on to my success page. It always complains for wicket id or component not exist and errors related based on what has been written on the java code or added to the markup html file. Here is the code to call the draggable dialogbox i created..Yes I wrote the wicket:extend for subclass. Still very confusing to me..please help.

This code is inside the AjaxButton Click...
HomePanel homepanel = new HomePanel("homepanel");
homepanel.setOutputMarkupId(true);
homepanel.setOutputMarkupPlaceholderTag(true); //tried removing it
homepanel.getMarkupId(true);  //just for trial i put here
homepanel.setVisible(true); 
add(homepanel);
homepanel.setVisible(true);
target.add(homepanel); 

Using apache wicket version 8.x
What am I do do. I am tapped out and no other way as my search also returns same thing .. any help.. thanks for the same.