What is the need to call setOutputMarkupId(true) in wicket components ?

When use Ajax with wicket you have to set the the component to output it’s markup id or else wicket framework complains about not having it set.
Only the targets needs the setOutputMarkupId(true). So if the component is Ajax driven than only setOutputMarkupId(true) is required.

Example: here this view will get populated by using ajax call back function.

WebMarkupContainer   view = new WebMarkupContainer(“view”);
view.setOutputMarkupId(true);

 

One thought on “What is the need to call setOutputMarkupId(true) in wicket components ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s