Part of the reason I was so short in my reply rather than talking about shale or jsf-spring is that I don't think we should be encouraging users to post questions in the issue tracker.
I don't think you should be rewarding him for asking there rather than asking on the list again :) On 1/11/06, Werner Punz (JIRA) <[email protected]> wrote: > [ > http://issues.apache.org/jira/browse/MYFACES-1019?page=comments#action_12362478 > ] > > Werner Punz commented on MYFACES-1019: > -------------------------------------- > > As Martin has pointed out, this is more of a usage problem, and definitely > not scope of a myfaces bug. > The solution is the shale view controller, if you are not familiar with that > one, also servlet filters work, or phase listeners. > (although phase listeners can only trigger an initial state securely not an > ending one, due to the possibiltiy of skipping additional phases > programmatically) > > Not having such things in normal backing beans is probably a design decision, > as it seems the JSF specificators kept the syntax of the backing beans as > POJO as possible, having such callback would break the POJO paradigm. > > (Shale for instance uses to my knowledge a special View Controller interface > which introduces the callbacks into the backing bean) > > > > JSF initial state > > ----------------- > > > > Key: MYFACES-1019 > > URL: http://issues.apache.org/jira/browse/MYFACES-1019 > > Project: MyFaces > > Type: Improvement > > Components: Implementation > > Versions: 1.1.1 > > Environment: Linux, WindowXP, JDeveloper > > Reporter: Guy Bashan > > > > > I am having this problem for a long time and lost any hope of getting a > > decent answer in any forum: > > It seems like JSF does not give any solution to initial state problem. > > A simple example: > > I want to show a simple table that is being updated according to several > > filters. > > The table should be shown with initial data according to filters selections. > > The actions that I am doing are: > > 1) To show initially the table, on the backing bean constructor I am > > loading the table data. > > 2) On any "valueChange" of every filter I want to load the new data of the > > table also, so I load the data again. > > This causes the data of the table to be loaded twice: once in the > > constructor and second in the value change listener method. > > This problem happens in many variations many times in JSF. Is there a way > > of initializing data properly ? > > For example, I would expect that in addition to the constructor there will > > be 2 additional methods: > > 1) init() - Will be called when screen first loads. > > 2) reinit() - Will be called when screen is reloaded. > > Am I missing here something ? Or there is a solid agreed way of solving > > the initial state term in JSF. > > By the way, I have to initialize data dynamically and not using managed > > properties. > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > >
