Hello, As I see, in JspStateManagerImpl.saveSerializedView (actually in the isWritingState() method), there is a check whether the JSP_IS_WRITING_STATE_ATTR is set in the FacesContext. But this attribute is set in ViewHandlerImpl.setWritingState() if there is no StateWriter defined (if the current view is a jsp). So, in my opinion, the verification in the JspStateManagerImpl.isWritingState() should also include the verification of the StateWriter. Otherwise, full state saving will work only for JSP-s.
Regards, Marius On Wed, Jul 21, 2010 at 3:49 PM, Martin Marinschek <[email protected]>wrote: > Hi Marius > > > --> Full state saving means setting the context parameter > > javax.faces.PARTIAL_STATE_SAVING to false. This is all, right? I've > noticed > > that just by doing this, the xhtml pages don't work anymore...only the > > jsp-s. There is no state saved in xhtml-s. Am I missing something? > > Oh my. That´s a bug then. Leonardo, can you look into this (not that I > desperately need full state saving, but some users might need it)? > > best regards, > > Martin > > >> On Tue, Jul 20, 2010 at 2:46 PM, Marius Petoi <[email protected] > > > >> wrote: > >> > Hi Leonardo, > >> > > >> > So you are working on UIData at the moment. What about UIRepeat? I see > >> > that > >> > partial state saving is not implemented in UIRepeat components. We > could > >> > improve the _childState table (which is included in the saved state) > to > >> > save > >> > only the states which are different from an initial state (like in > >> > UIData > >> > components). > >> > > >> > Regards, > >> > Marius > >> > > >> > On Mon, Jul 19, 2010 at 1:46 PM, Leonardo Uribe <[email protected]> > >> > wrote: > >> >> > >> >> Hi Marius > >> >> > >> >> Right now I'm working on "MYFACES-2616 Fix UIData state saving model > >> >> (spec > >> >> issue 153)". I hope to attach some new patches, a example and a > better > >> >> documentation in that issue soon, so we can review it and make > >> >> comments. > >> >> > >> >> regards, > >> >> > >> >> Leonardo Uribe > >> >> > >> >> 2010/7/19 Marius Petoi <[email protected]> > >> >>> > >> >>> Hi Martin, > >> >>> > >> >>> Regarding state saving in tables, here are my observations and > >> >>> comments: > >> >>> - there is no state saved in relation to the UIData objects. > >> >>> - the states saved for the children of the UIData objects (the > >> >>> components > >> >>> in the tables) are irrelevant. They are not used afterwards, as the > >> >>> components are initialized at each request with default values and > the > >> >>> state > >> >>> saved corresponds to the last modifications of the component (to the > >> >>> row > >> >>> which was last set via the setRowIndex() method). > >> >>> - every time the setRowIndex() method is invoked with the -1 > >> >>> parameter, > >> >>> _initialDescendantComponentState is initialized. This will no longer > >> >>> be > >> >>> necessary, as the initial state will be restored from the previously > >> >>> saved > >> >>> state. > >> >>> - the _rowStates array of states is constructed using "partial" > state. > >> >>> This means that only states for the rows which are different from > the > >> >>> template are saved in this array. In my opinion, this is what needs > to > >> >>> be > >> >>> saved for the UIData. The children component of the UIData should > have > >> >>> no > >> >>> state saved (at least not in the first phase - we could think that > if > >> >>> something appears in all the rows of _rowStates for a componentt, > then > >> >>> we > >> >>> could move this down to the component state). > >> >>> > >> >>> These are just some basic observations about state saving in tables. > >> >>> What > >> >>> do you think? > >> >>> > >> >>> Regards, > >> >>> Marius > >> >>> > >> >>> On Wed, Jul 14, 2010 at 4:29 PM, Martin Marinschek > >> >>> <[email protected]> wrote: > >> >>>> > >> >>>> Ok, so you actually checked it - perfect! > >> >>>> > >> >>>> Next step: is there any component where this is different? UIInput > is > >> >>>> ok - all the other standard components are ok as well? > >> >>>> > >> >>>> When we have finished this, take a look at what Leonardo has done > for > >> >>>> partial state saving in data-tables. We will need to work out a > >> >>>> proposal for an API in JSF 2.1 - and, I guess, alsongside our > >> >>>> implementation, also an implementation for Mojarra, cause the RI > team > >> >>>> will not be able to get this done. > >> >>>> > >> >>>> best regards, > >> >>>> > >> >>>> Martin > >> >>>> > >> >>>> On 7/14/10, Marius Petoi <[email protected]> wrote: > >> >>>> > I placed a breakpoint in > >> >>>> > DefaultFaceletsManagementStrategy.saveStateOnMap, > >> >>>> > in the point where saveState is called for each component. That > is > >> >>>> > the > >> >>>> > point > >> >>>> > where the state to be saved is retrieved. That is where I got the > >> >>>> > information on the first place. I looked at each component and at > >> >>>> > the > >> >>>> > returned value of saveState. > >> >>>> > > >> >>>> > On Wed, Jul 14, 2010 at 3:41 PM, Martin Marinschek > >> >>>> > <[email protected]>wrote: > >> >>>> > > >> >>>> >> Hi Marius, > >> >>>> >> > >> >>>> >> "as I see" means you see it, or you think it is like this ;) ? > >> >>>> >> > >> >>>> >> best regards, > >> >>>> >> > >> >>>> >> Martin > >> >>>> >> > >> >>>> >> On 7/14/10, Marius Petoi <[email protected]> wrote: > >> >>>> >> > Hi Martin, > >> >>>> >> > > >> >>>> >> > I think you mean for the attributes that I say are added > before > >> >>>> >> > the > >> >>>> >> > call > >> >>>> >> to > >> >>>> >> > markInitialState(). So, as I see, the > >> >>>> >> > org.apache.myfaces.view.facelets.MARK_ID, locale, > >> >>>> >> > uniqueIdCounter, > >> >>>> >> > renderKitId, rendererType are not present in the partial state > >> >>>> >> > at > >> >>>> >> > the > >> >>>> >> > end > >> >>>> >> of > >> >>>> >> > the lifecycle, although they are in the StateHelper. The > reason > >> >>>> >> > for > >> >>>> >> > this > >> >>>> >> is > >> >>>> >> > that they are added there before the call to > markInitialState(). > >> >>>> >> > So, > >> >>>> >> > they > >> >>>> >> > will never be in the partial state. > >> >>>> >> > > >> >>>> >> > Regards, > >> >>>> >> > Marius > >> >>>> >> > > >> >>>> >> > On Wed, Jul 14, 2010 at 3:05 PM, Martin Marinschek > >> >>>> >> > <[email protected]>wrote: > >> >>>> >> > > >> >>>> >> >> Hi Marius, > >> >>>> >> >> > >> >>>> >> >> you are sounding a bit unsure about this - did you really > check > >> >>>> >> >> what > >> >>>> >> >> is in the partial state at the end of the lifecycle? > >> >>>> >> >> > >> >>>> >> >> best regards, > >> >>>> >> >> > >> >>>> >> >> Martin > >> >>>> >> >> > >> >>>> >> >> On 7/14/10, Marius Petoi <[email protected]> wrote: > >> >>>> >> >> > Hello, > >> >>>> >> >> > > >> >>>> >> >> > After the improvements we discussed in previous threads, > here > >> >>>> >> >> > is > >> >>>> >> >> > what > >> >>>> >> >> > the > >> >>>> >> >> > state looks like for some of the components: > >> >>>> >> >> > > >> >>>> >> >> > - the org.apache.myfaces.view.facelets.MARK_ID > >> >>>> >> >> > (ComponentSupport.MARK_CREATED) attribute is present in > >> >>>> >> >> > almost > >> >>>> >> >> > all > >> >>>> >> >> > the > >> >>>> >> >> > components, but that is put in the attributes map before > the > >> >>>> >> >> > initial > >> >>>> >> >> state > >> >>>> >> >> > is marked, so I think it does not affect partial state > saving > >> >>>> >> >> > > >> >>>> >> >> > - same goes for locale, uniqueIdCounter, renderKitId, > >> >>>> >> >> > rendererType, > >> >>>> >> >> > which > >> >>>> >> >> > are also attributes in the StateHelper, but are added > before > >> >>>> >> >> > the > >> >>>> >> >> > call > >> >>>> >> to > >> >>>> >> >> > markInitialState(). So they also shouldn't be included in > the > >> >>>> >> >> > partial > >> >>>> >> >> state. > >> >>>> >> >> > > >> >>>> >> >> > - for UIInput, the partial state contains the value, > >> >>>> >> >> > localValueSet, > >> >>>> >> >> > submittedValue and valid properties. This is the partial > >> >>>> >> >> > state > >> >>>> >> >> > which > >> >>>> >> is > >> >>>> >> >> > stored after one submit. > >> >>>> >> >> > > >> >>>> >> >> > Do you have other suggestions about what else could be > >> >>>> >> >> > improved > >> >>>> >> >> > in > >> >>>> >> >> partial > >> >>>> >> >> > state saving? > >> >>>> >> >> > > >> >>>> >> >> > Regards, > >> >>>> >> >> > Marius > >> >>>> >> >> > > >> >>>> >> >> > >> >>>> >> >> > >> >>>> >> >> -- > >> >>>> >> >> > >> >>>> >> >> http://www.irian.at > >> >>>> >> >> > >> >>>> >> >> Your JSF powerhouse - > >> >>>> >> >> JSF Consulting, Development and > >> >>>> >> >> Courses in English and German > >> >>>> >> >> > >> >>>> >> >> Professional Support for Apache MyFaces > >> >>>> >> >> > >> >>>> >> > > >> >>>> >> > >> >>>> >> > >> >>>> >> -- > >> >>>> >> > >> >>>> >> http://www.irian.at > >> >>>> >> > >> >>>> >> Your JSF powerhouse - > >> >>>> >> JSF Consulting, Development and > >> >>>> >> Courses in English and German > >> >>>> >> > >> >>>> >> Professional Support for Apache MyFaces > >> >>>> >> > >> >>>> > > >> >>>> > >> >>>> > >> >>>> -- > >> >>>> > >> >>>> http://www.irian.at > >> >>>> > >> >>>> Your JSF powerhouse - > >> >>>> JSF Consulting, Development and > >> >>>> Courses in English and German > >> >>>> > >> >>>> Professional Support for Apache MyFaces > >> >>> > >> >> > >> > > >> > > >> > >> > >> > >> -- > >> > >> http://www.irian.at > >> > >> Your JSF powerhouse - > >> JSF Consulting, Development and > >> Courses in English and German > >> > >> Professional Support for Apache MyFaces > > > > > > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces >
