Hi!
I have a controller bean that is annotated with an (at)Controller annotation. Now I want to set some properties at creation time of that controller.
My controller is (only the relevant parts):
I have tried this definition in the application context:Code:package foo.web; (at)Controller public class ChangeListController { private int entriesPerPage = 25; public void setEntriesPerPage(int value) { this.entriesPerPage = value; } }
Anyhow the controller still uses the default value (25). I guess it's because two controller instances are created that way.Code:<bean id="changeListController" class="foo.web.ChangeListController"> <property name="entriesPerPage" value="50"/> </bean>
So, how can I set the properties in that controller?
Thanks!


Reply With Quote