Ok, so when you say "I need to add more than 1 window", do you mean that the
type of window can differ, or that you want to add multiple windows at once?

In the first case (1 window), you could go for:
final WebMarkupContainer hook = new WebMarkupContainer("win1");
hook.setOutputMarkupId( true );
hook.setOutputMarkupPlaceholderTag( true );
m.add( hook );
and then in onClick( AjaxRequestTarget ) you call m.addOrReplace( window )
and add the window to the AjaxRequestTarget;

In the latter case (multiple windows), you could go for a RepeatingView;
you'll need to put it in a WebMarkupContainer with setOutputMarkupId to true
since you cannot refresh a RepeatingView itself through AJAX. You can (re-)
populate the RepeatingView manually in the onClick( AjaxRequestHandler )
method and add it so it get's re-rendered.

marioosh.net wrote:
> bgooren wrote:
>> Well, you need to have some html in the container with wicket:id="win1"
>> for your code to work. Wicket is (correctly) complaining that it cannot
>> locate html for your component. What kind of component is Window? (it's
>> not a standard wicket component)
> Window is simple:
> public class Window extends Panel {
>         ...
> }
> <wicket:panel
> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>
>       <div>...</div>
> </wicket:panel>
> When i add containser with wicket:id="win1" to template, i need to add
> component too, but i need add component after click button. And i need to
> add more then one window.

View this message in context: 
Sent from the Wicket - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to