1
私は二つdropdownchoiceを有する第dropdownchoiceから値を選択した後、私は、データベーステーブルから関連する値の
選択リストに必要と第二
dropdownchoiceにこのリストを追加します。ここに参考のためのサンプルコードがあります。
ヒントや参照を教えてください。最初のdropdownchoiceで値を選択すると、2番目のdropdownchoiceに値を追加する方法は?
HTML:
<select wicket:id="DDCStartDate" style=" width : 98px;"></select>
<select wicket:id="DDCEndDate" style=" width : 98px;">.
Javaコード:
final DropDownChoice DDCStartDate=new DropDownChoice("DDCStartDate",new
PropertyModel(collectionReportModel, "DDCStartDate"),lst);
add(DDCStartDate);
DDCStartDate.setOutputMarkupId(true);
final DropDownChoice DDCEndDate=new DropDownChoice("DDCEndDate",);
add(DDCEndDate);
DDCEndDate.setOutputMarkupId(true);
POJOコード:
private Date DDCStartDate;
private Date DDCEndDate;
public Date getDDCStartDate()
{
return DDCStartDate;
}
public void setDDCStartDate(Date dDCStartDate)
{
DDCStartDate = dDCStartDate;
}
public Date getDDCEndDate() {
return DDCEndDate;
}
public void setDDCEndDate(Date dDCEndDate) {
DDCEndDate = dDCEndDate;
}
thnx a lot sir。 – user1263633