PDA

View Full Version : CheckBoxListView<BeanModel> setChecked() not working



knil123rich
2 Mar 2012, 12:15 PM
Hi,
I'm using GXT2.2.4 and am facing the following problem.

I have ContentPanel1(RowLayout()) , ContentPanel2(FlowLayout()), ContentPanel3(FlowLayout())

In one of the methods I add CheckBoxListView to the ContentPanel3 i.e
public voif methodA() {
ContentPanel3 .add(CheckBoxListView);
ContentPanel3.layout(true);

ContentPanel2.addContentPanel3 ();
ContentPanel2.layout(true);

//Now I set a node from the checklist view to true(selected)
CheckBoxListView.setChecked(node, true);
}

public void methodB() {
ContentPanel1.add(ContentPanel2);
ContentPanel1.layout(true);
}

The setChecked(true) is not working.
Can you please help?

Note: this works in case of 2 panels only . i.e in the above example if the checkBoxListView is added to ContentPanel2 and then setChecked in called and the ContentPanel2 is added to ContentPanel1().
It works well.

Regards.