Hello

I use the select component with the @InjectSelectionModel annotation as 
described here:
http://wiki.apache.org/tapestry/Tapestry5AnotherSelectWithObjects

<select t:type="select" t:id="categorySelect" model="categoriesSelectionModel" 
encoder="categoriesValueEncoder" value="selectedCategory" />

The select is nicely loaded with categories. Next I submit the form and I 
notice that the setSelectedCategory method is called. But it prints 
"setSelectedCategory:  null"
See below for some the corresponding java code. What am I doing wrong? Why is 
the selectedCategory null, after I have selected a category and submitted the 
form?

@InjectSelectionModel(labelField = "name", idField = "id")
@Property
private List<Category> categories = new ArrayList<Category>();

@Persist
private Category selectedCategory;

public void setSelectedCategory(Category selectedCategory) {

      System.out.println("setSelectedCategory: " + selectedCategory);

      this.selectedCategory = selectedCategory;

}

public Category getSelectedRootCategory() {
      return selectedRootCategory;
}



_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

Reply via email to