私はVertiacalパネルオブジェクトを持っており、このオブジェクトは、多くのラジオボタンGWTは、コンポーネント
は、だから私はVertiacalパネルオブジェクトを介して、それらのRadioButtonオブジェクトを取得することができます含まれているを取得します。
多分、繰り返しまたは?
private void initCourse() {
coursePopupPanel.clear();
VerticalPanel verticalPanel = new VerticalPanel();
coursePopupPanel.setWidget(verticalPanel);
JsArray<JCourse> jCourseArray = JCourse.getList(stringMainData);
for (int i = 0; i < jCourseArray.length(); i++) {
final RadioButton courseRadioButton = new RadioButton("course");
courseRadioButton.setText(jCourseArray.get(i).getName());
courseRadioButton.getElement().setId(jCourseArray.get(i).getView());
verticalPanel.add(courseRadioButton);
//handler of course radio buttons
courseRadioButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
}
});
}
}
私はcoursePopupPanelへの参照があります。しかし私はverticalパネルを参照していないので、coursePopupPanelへの参照を保持するvertical panel sonceの要素を得ることができます。
http:// stackoverflowをご覧ください。com/questions/14290240/gwt-retrieve-components-from-formpanel-verticalpanel-which-are-added-dynamicall – Dipak