1
我正在在檢票口的簡單下拉組件,此處的例子:現在//www.mkyong.com/wicket/wicket-select-example/檢票選擇propertymode- - 沒有get方法定義
:HTTP我得到錯誤: 最後一個原因:沒有爲類定義get方法:class no.polaris.AdressaHomePage expression:2011
有人看到有什麼問題嗎? (它對於選擇年份的吸氣劑沒有幫助)。
乾杯 泰耶Eithun
public class AdressaHomePage extends BasePage {
private String selectedYear = "2011";
public AdressaHomePage(final PageParameters parameters) {
add(new FeedbackPanel("feedback"));
Form<?> form = new Form<Void>("form") {
@Override
protected void onSubmit() {
info("Selected year: " + selectedYear);
}
};
add(form);
Select<String> yearSelector = new Select<String>("year-selector", new PropertyModel<String>(this, selectedYear));
yearSelector.add(new SelectOption<String>("year1", new Model<String>("2012")));
yearSelector.add(new SelectOption<String>("year2", new Model<String>("2011")));
yearSelector.add(new SelectOption<String>("year3", new Model<String>("2010")));
yearSelector.add(new SelectOption<String>("year4", new Model<String>("2009")));
form.add(yearSelector);
}
}