1
나는 두 개의 dropdownchoice을 가지고 있는데 첫 번째 dropdownchoice에서 값을 선택한 후
데이터베이스 테이블에서 관련 값 목록을 선택하고이 목록을 두 번째로
dropdownchoice에 추가해야합니다. 다음은 참조 용 샘플 코드입니다.
힌트 또는 참조를주세요.첫 번째 dropdownchoice에서 값을 선택할 때 두 번째 dropdownchoice에 값을 추가하는 방법은 무엇입니까?
HTML:
<select wicket:id="DDCStartDate" style=" width : 98px;"></select>
<select wicket:id="DDCEndDate" style=" width : 98px;">.
자바 코드 :
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