Issue
I created List view which contain 2 textboxes
& i want to fill those on ajaxbutton submit.
but I am getting this error:
Component com.cerebrum.pages.ShowCalculator$ShowCalculatorForm$2 has been added to the target. This component is a repeater and cannot be repainted via ajax directly. Instead add its parent or another markup container higher in the hierarchy.
Solution
You should surround your list view with a WebMarkupContainer and add this markup container to the request target.
html code:
<div wicket:id="wmc"> ... put your list view here ... </div>
java code
final WebMarkupContainer wmc = new WebMarkupContainer("wmc");
add(wmc);
ListView yourListView = ...
// init your list view here
wmc.add(yourListView);
SubmitButton yourButton = new SubmitButton("yourButton") {
@Override
public void onSubmit(AjaxRequestTarget target) {
target.add(wmc);
}
}
add(yourButton);
Answered By - magomi