我在Wicket中做了一个简单的下调部分,这里的例子如下:http://www.mkyong.com/wicket/wicket-select-example/。
now I get the error: Last cause: No get method defined for class: class no.polaris.AdressaHomePage expression: 2011
有人看到什么是错的吗?
Cheers Terje 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);
时 时
时 时