Thank you for answer Pete
So you think that loading data from database should be done inside action method (here
doSomething)?
What about first page load, where no action was fired?
first page load - getData
action load - getData, action, getData
For information - this is event scoped seam component and data are loaded from database.
Such loaded data depends on your action, if no action, than load default data.
So here is code:
| @Name("event")
| @Scope(EVENT)
| public class Event {
| List<Item> data = null;
| getData ... return data;
| setData ... this.data = data;
|
| doSomething() {
| if(linkParameter == null)
| loadDefaultDataFromDatabase();
| else
| loadDataFromDatabase(linkParameter);
| }
| ...
|
so if you access page for first time, null data are returned, that is why i thought that
loading data must be inside getters methods
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074345#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...