public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
// 入力フォームを取得
DynaActionForm inform = (DynaActionForm)form;
// ラジオボタンチェックデータの取得
String stringData = (String)inform.get("stringData");
System.out.println("stringData:" + stringData);
// 動的なラジオボタンのデータの生成
List<UserData> list = new ArrayList<UserData>();
UserData data1 = new UserData();
data1.setId("01");
data1.setName("北海道");
UserData data2 = new UserData();
data2.setId("02");
data2.setName("東北");
UserData data3 = new UserData();
data3.setId("03");
data3.setName("関東");
list.add(data1);
list.add(data2);
list.add(data3);
request.setAttribute("listData", list);
return mapping.findForward("success");
}
|