Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 5530 invoked from network); 23 Jul 2010 07:55:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Jul 2010 07:55:30 -0000 Received: (qmail 99343 invoked by uid 500); 23 Jul 2010 07:55:30 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 99143 invoked by uid 500); 23 Jul 2010 07:55:28 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 99117 invoked by uid 99); 23 Jul 2010 07:55:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jul 2010 07:55:26 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.215.53] (HELO mail-ew0-f53.google.com) (209.85.215.53) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jul 2010 07:55:18 +0000 Received: by ewy19 with SMTP id 19so3567300ewy.12 for ; Fri, 23 Jul 2010 00:54:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.31.83 with SMTP id x19mr269173ebc.82.1279871698140; Fri, 23 Jul 2010 00:54:58 -0700 (PDT) Received: by 10.213.17.6 with HTTP; Fri, 23 Jul 2010 00:54:58 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Jul 2010 10:54:58 +0300 Message-ID: Subject: Re: [GSOC] State saving status after first improvements From: Marius Petoi To: MyFaces Development Content-Type: multipart/alternative; boundary=0015174c1c04ecfd94048c0959da X-Virus-Checked: Checked by ClamAV on apache.org --0015174c1c04ecfd94048c0959da Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Martin, The state of a typical input text contains the following 4 attributes (both the keys and the values): valid, value, localValueSet and submittedValue. Value and submittedValue may be null, in this case only the keys are contained in the state. Valid and localValueSet are boolean properties. I measured the state of an input text to be approximately 300 B. If this is i= n a table, you need to multiply it by the number of rows in that table. Regards, Marius On Fri, Jul 23, 2010 at 6:07 AM, Martin Marinschek wrote: > Hi guys, > > > > Unfortunately, try to save the state directly on the child components i= s > not > > possible. The problem is the datatable is the one who know about the > rows, > > so the right place for save this information (at least the delta > > information) is there. But the initial state could be saved on the > children > > if some additional methods are provided. I don't know if it is worth to > add > > those methods, because the only one interested to save the initial stat= e > is > > the datatable (things are different if the children could use that > > information to "reset" the current state, maybe a method called > > resetInitialState). My first solution for partial state saving used a > > protected variable to save the initial state on the children, but after > look > > the latest solution I'm inclined to implement the latest one. > > Leonardo is right - I don=B4t see a way to do this either. Additionally, > I don=B4t think changing the location will buy any major reductions. > > For the state of a normal input text - what exactly does it consist > of, highlight the size of each of the parts. > > best regards, > > Martin > > >> On Wed, Jul 21, 2010 at 7:51 PM, Leonardo Uribe > wrote: > >>> > >>> Hi Marius, Martin > >>> > >>> Yes, it is a bug. The problem is related to some changes done on > >>> MYFACES-2754. I think that this changes was tested against jsp but no= t > >>> against facelets. I reverted the changes so you can test now. > >>> > >>> regards, > >>> > >>> Leonardo Uribe > >>> > >>> 2010/7/21 Martin Marinschek > >>>> > >>>> Hi Marius, > >>>> > >>>> ok, Leonardo will hopefully take a look - for you to continue: just > >>>> post the partial state values for typical pages right now (you can > >>>> also take the pages of the sample as a base if you want). > >>>> > >>>> best regards, > >>>> > >>>> Martin > >>>> > >>>> On Wed, Jul 21, 2010 at 3:23 PM, Marius Petoi < > marius.petoi@codebeat.ro> > >>>> wrote: > >>>> > Hello, > >>>> > > >>>> > As I see, in JspStateManagerImpl.saveSerializedView (actually in t= he > >>>> > 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 StateWrite= r > >>>> > defined > >>>> > (if the current view is a jsp). So, in my opinion, the verificatio= n > 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 > >>>> > > >>>> > 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=B4s 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 > >>>> >> >> > >>>> >> >> 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 save= d > >>>> >> >> > 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 > >>>> >> >> > > >>>> >> >> > 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 a= nd > a > >>>> >> >> >> better > >>>> >> >> >> documentation in that issue soon, so we can review it and > make > >>>> >> >> >> comments. > >>>> >> >> >> > >>>> >> >> >> regards, > >>>> >> >> >> > >>>> >> >> >> Leonardo Uribe > >>>> >> >> >> > >>>> >> >> >> 2010/7/19 Marius Petoi > >>>> >> >> >>> > >>>> >> >> >>> Hi Martin, > >>>> >> >> >>> > >>>> >> >> >>> Regarding state saving in tables, here are my observations > and > >>>> >> >> >>> comments: > >>>> >> >> >>> - there is no state saved in relation to the UIData object= s. > >>>> >> >> >>> - the states saved for the children of the UIData objects > (the > >>>> >> >> >>> components > >>>> >> >> >>> in the tables) are irrelevant. They are not used afterward= s, > >>>> >> >> >>> as the > >>>> >> >> >>> components are initialized at each request with default > values > >>>> >> >> >>> and > >>>> >> >> >>> the > >>>> >> >> >>> state > >>>> >> >> >>> saved corresponds to the last modifications of the compone= nt > >>>> >> >> >>> (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 differe= nt > >>>> >> >> >>> 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 > >>>> >> >> >>> 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 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 > >>>> >> >> >>>> > 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 > 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 > >>>> >> >> >>>> >> > 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 > >>>> >> >> >>>> >> >> 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 cou= ld > >>>> >> >> >>>> >> >> > 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 > >>>> > > >>>> > > >>>> > >>>> > >>>> > >>>> -- > >>>> > >>>> 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 > --0015174c1c04ecfd94048c0959da Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Martin,

The state of a typical input text contains the following = 4 attributes (both the keys and the values): valid, value, localValueSet an= d submittedValue. Value and submittedValue may be null, in this case only t= he keys are contained in the state. Valid and localValueSet are boolean pro= perties. I measured the state of an input text to be approximately 300 B. I= f this is in a table, you need to multiply it by the number of rows in that= table.

Regards,
Marius

On Fri, Jul 23, 20= 10 at 6:07 AM, Martin Marinschek <mmarinschek@apache.org> wrote:
Hi guys,


> Unfortunately, try to save the state directly on the child components = is not
> possible. The problem is the datatable is the one who know about the r= ows,
> so the right place for save this information (at least the delta
> information) is there. But the initial state could be saved on the chi= ldren
> if some additional methods are provided. I don't know if it is wor= th to add
> those methods, because the only one interested to save the initial sta= te is
> the datatable (things are different if the children could use that
> information to "reset" the current state, maybe a method cal= led
> resetInitialState). My first solution for partial state saving used a<= br> > protected variable to save the initial state on the children, but afte= r look
> the latest solution I'm inclined to implement the latest one.

Leonardo is right - I don=B4t see a way to do this either. Additional= ly,
I don=B4t think changing the location will buy any major reductions.

For the state of a normal input text - what exactly does it consist
of, highlight the size of each of the parts.

best regards,

Martin

>> On Wed, Jul 21, 2010 at 7:51 PM, Leonardo Uribe <lu4242@gmail.com> wrote:
>>>
>>> Hi Marius, Martin
>>>
>>> Yes, it is a bug. The problem is related to some changes done = on
>>> MYFACES-2754. I think that this changes was tested against jsp= but not
>>> against facelets. I reverted the changes so you can test now.<= br> >>>
>>> regards,
>>>
>>> Leonardo Uribe
>>>
>>> 2010/7/21 Martin Marinschek <mmarinschek@apache.org>
>>>>
>>>> Hi Marius,
>>>>
>>>> ok, Leonardo will hopefully take a look - for you to conti= nue: just
>>>> post the partial state values for typical pages right now = (you can
>>>> also take the pages of the sample as a base if you want).<= br> >>>>
>>>> best regards,
>>>>
>>>> Martin
>>>>
>>>> On Wed, Jul 21, 2010 at 3:23 PM, Marius Petoi <marius.petoi@codebeat.ro>
>>>> wrote:
>>>> > Hello,
>>>> >
>>>> > As I see, in JspStateManagerImpl.saveSerializedView (= actually in the
>>>> > isWritingState() method), there is a check whether th= e
>>>> > 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, th= e verification in
>>>> > the
>>>> > JspStateManagerImpl.isWritingState() should also incl= ude the
>>>> > verification of
>>>> > the StateWriter. Otherwise, full state saving will wo= rk only for
>>>> > JSP-s.
>>>> >
>>>> > Regards,
>>>> > Marius
>>>> >
>>>> > On Wed, Jul 21, 2010 at 3:49 PM, Martin Marinschek >>>> > <mmarins= chek@apache.org>
>>>> > wrote:
>>>> >>
>>>> >> Hi Marius
>>>> >>
>>>> >> > --> Full state saving means setting the c= ontext parameter
>>>> >> > javax.faces.PARTIAL_STATE_SAVING to false. T= his 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. A= m I missing something?
>>>> >>
>>>> >> Oh my. That=B4s a bug then. Leonardo, can you loo= k into this (not that
>>>> >> I
>>>> >> desperately need full state saving, but some user= s might need it)?
>>>> >>
>>>> >> best regards,
>>>> >>
>>>> >> Martin
>>>> >>
>>>> >> >> On Tue, Jul 20, 2010 at 2:46 PM, Marius = Petoi
>>>> >> >> <marius.petoi@codebeat.ro>
>>>> >> >> wrote:
>>>> >> >> > Hi Leonardo,
>>>> >> >> >
>>>> >> >> > So you are working on UIData at the= moment. What about UIRepeat?
>>>> >> >> > I
>>>> >> >> > see
>>>> >> >> > that
>>>> >> >> > partial state saving is not impleme= nted in UIRepeat components.
>>>> >> >> > We
>>>> >> >> > could
>>>> >> >> > improve the _childState table (whic= h 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, Le= onardo Uribe
>>>> >> >> > <lu4242@gmail.com>
>>>> >> >> > wrote:
>>>> >> >> >>
>>>> >> >> >> Hi Marius
>>>> >> >> >>
>>>> >> >> >> Right now I'm working on &q= uot;MYFACES-2616 Fix UIData state saving
>>>> >> >> >> model
>>>> >> >> >> (spec
>>>> >> >> >> issue 153)". I hope to att= ach some new patches, a example and a
>>>> >> >> >> better
>>>> >> >> >> documentation in that issue soo= n, so we can review it and make
>>>> >> >> >> comments.
>>>> >> >> >>
>>>> >> >> >> regards,
>>>> >> >> >>
>>>> >> >> >> Leonardo Uribe
>>>> >> >> >>
>>>> >> >> >> 2010/7/19 Marius Petoi <marius.petoi@codebeat.ro> >>>> >> >> >>>
>>>> >> >> >>> Hi Martin,
>>>> >> >> >>>
>>>> >> >> >>> Regarding state saving in t= ables, here are my observations and
>>>> >> >> >>> comments:
>>>> >> >> >>> - there is no state saved i= n relation to the UIData objects.
>>>> >> >> >>> - the states saved for the = children of the UIData objects (the
>>>> >> >> >>> components
>>>> >> >> >>> in the tables) are irreleva= nt. They are not used afterwards,
>>>> >> >> >>> as the
>>>> >> >> >>> components are initialized = at each request with default values
>>>> >> >> >>> and
>>>> >> >> >>> the
>>>> >> >> >>> state
>>>> >> >> >>> saved corresponds to the la= st modifications of the component
>>>> >> >> >>> (to
>>>> >> >> >>> the
>>>> >> >> >>> row
>>>> >> >> >>> which was last set via the = setRowIndex() method).
>>>> >> >> >>> - every time the setRowInde= x() method is invoked with the -1
>>>> >> >> >>> parameter,
>>>> >> >> >>> _initialDescendantComponent= State is initialized. This will no
>>>> >> >> >>> longer
>>>> >> >> >>> be
>>>> >> >> >>> necessary, as the initial s= tate will be restored from the
>>>> >> >> >>> previously
>>>> >> >> >>> saved
>>>> >> >> >>> state.
>>>> >> >> >>> - the _rowStates array of s= tates 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 c= hildren component of the UIData
>>>> >> >> >>> should
>>>> >> >> >>> have
>>>> >> >> >>> no
>>>> >> >> >>> state saved (at least not i= n the first phase - we could think
>>>> >> >> >>> that
>>>> >> >> >>> if
>>>> >> >> >>> something appears in all th= e rows of _rowStates for a
>>>> >> >> >>> componentt,
>>>> >> >> >>> then
>>>> >> >> >>> we
>>>> >> >> >>> could move this down to the= component state).
>>>> >> >> >>>
>>>> >> >> >>> These are just some basic o= bservations about state saving in
>>>> >> >> >>> tables.
>>>> >> >> >>> What
>>>> >> >> >>> do you think?
>>>> >> >> >>>
>>>> >> >> >>> Regards,
>>>> >> >> >>> Marius
>>>> >> >> >>>
>>>> >> >> >>> On Wed, Jul 14, 2010 at 4:2= 9 PM, Martin Marinschek
>>>> >> >> >>> <mmarinschek@apache.org> wrote:
>>>> >> >> >>>>
>>>> >> >> >>>> Ok, so you actually che= cked it - perfect!
>>>> >> >> >>>>
>>>> >> >> >>>> Next step: is there any= component where this is different?
>>>> >> >> >>>> UIInput
>>>> >> >> >>>> is
>>>> >> >> >>>> ok - all the other stan= dard components are ok as well?
>>>> >> >> >>>>
>>>> >> >> >>>> When we have finished t= his, 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 Peto= i <marius.petoi@codebeat.ro<= /a>> wrote:
>>>> >> >> >>>> > I placed a breakpo= int in
>>>> >> >> >>>> > DefaultFaceletsMan= agementStrategy.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, 20= 10 at 3:41 PM, Martin Marinschek
>>>> >> >> >>>> > <
mmarinschek@apache.org>wrote:
>>>> >> >> >>>> >
>>>> >> >> >>>> >> Hi Marius,
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> "as I see= " means you see it, or you think it is like this
>>>> >> >> >>>> >> ;) ?
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> best regards,<= br> >>>> >> >> >>>> >>
>>>> >> >> >>>> >> Martin
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> On 7/14/10, Ma= rius Petoi <marius.petoi@cod= ebeat.ro> wrote:
>>>> >> >> >>>> >> > Hi Martin= ,
>>>> >> >> >>>> >> >
>>>> >> >> >>>> >> > I think y= ou mean for the attributes that I say are added
>>>> >> >> >>>> >> > before >>>> >> >> >>>> >> > the
>>>> >> >> >>>> >> > call
>>>> >> >> >>>> >> to
>>>> >> >> >>>> >> > markIniti= alState(). So, as I see, the
>>>> >> >> >>>> >> > org.apach= e.myfaces.view.facelets.MARK_ID, locale,
>>>> >> >> >>>> >> > uniqueIdC= ounter,
>>>> >> >> >>>> >> > renderKit= Id, rendererType are not present in the partial
>>>> >> >> >>>> >> > state
>>>> >> >> >>>> >> > at
>>>> >> >> >>>> >> > the
>>>> >> >> >>>> >> > end
>>>> >> >> >>>> >> of
>>>> >> >> >>>> >> > the lifec= ycle, although they are in the StateHelper. The
>>>> >> >> >>>> >> > reason >>>> >> >> >>>> >> > for
>>>> >> >> >>>> >> > this
>>>> >> >> >>>> >> is
>>>> >> >> >>>> >> > that they= are added there before the call to
>>>> >> >> >>>> >> > markIniti= alState().
>>>> >> >> >>>> >> > So,
>>>> >> >> >>>> >> > they
>>>> >> >> >>>> >> > will neve= r be in the partial state.
>>>> >> >> >>>> >> >
>>>> >> >> >>>> >> > Regards,<= br> >>>> >> >> >>>> >> > Marius >>>> >> >> >>>> >> >
>>>> >> >> >>>> >> > On Wed, J= ul 14, 2010 at 3:05 PM, Martin Marinschek
>>>> >> >> >>>> >> > <mmarinschek@apache.org>wrote: >>>> >> >> >>>> >> >
>>>> >> >> >>>> >> >> Hi Ma= rius,
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> you a= re sounding a bit unsure about this - did you
>>>> >> >> >>>> >> >> reall= y
>>>> >> >> >>>> >> >> check=
>>>> >> >> >>>> >> >> what<= br> >>>> >> >> >>>> >> >> is in= the partial state at the end of the lifecycle?
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> best = regards,
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> Marti= n
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> On 7/= 14/10, Marius Petoi <marius.= petoi@codebeat.ro>
>>>> >> >> >>>> >> >> wrote= :
>>>> >> >> >>>> >> >> > = Hello,
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >> > = After the improvements we discussed in previous
>>>> >> >> >>>> >> >> > = threads,
>>>> >> >> >>>> >> >> > = here
>>>> >> >> >>>> >> >> > = is
>>>> >> >> >>>> >> >> > = what
>>>> >> >> >>>> >> >> > = the
>>>> >> >> >>>> >> >> > = state looks like for some of the components:
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >> > = - 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
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >> > = - 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= .
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >> > = - for UIInput, the partial state contains the value,
>>>> >> >> >>>> >> >> > = localValueSet,
>>>> >> >> >>>> >> >> > = submittedValue and valid properties. This is the
>>>> >> >> >>>> >> >> > = partial
>>>> >> >> >>>> >> >> > = state
>>>> >> >> >>>> >> >> > = which
>>>> >> >> >>>> >> is
>>>> >> >> >>>> >> >> > = stored after one submit.
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >> > = Do you have other suggestions about what else could
>>>> >> >> >>>> >> >> > = be
>>>> >> >> >>>> >> >> > = improved
>>>> >> >> >>>> >> >> > = in
>>>> >> >> >>>> >> >> parti= al
>>>> >> >> >>>> >> >> > = state saving?
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >> > = Regards,
>>>> >> >> >>>> >> >> > = Marius
>>>> >> >> >>>> >> >> ><= br> >>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> -- >>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> http://www.irian.at
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> Your = JSF powerhouse -
>>>> >> >> >>>> >> >> JSF C= onsulting, Development and
>>>> >> >> >>>> >> >> Cours= es in English and German
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >> Profe= ssional Support for Apache MyFaces
>>>> >> >> >>>> >> >>
>>>> >> >> >>>> >> >
>>>> >> >> >>>> >>
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> --
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> http://www.irian.at
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> Your JSF power= house -
>>>> >> >> >>>> >> JSF Consulting= , Development and
>>>> >> >> >>>> >> Courses in Eng= lish and German
>>>> >> >> >>>> >>
>>>> >> >> >>>> >> Professional S= upport for Apache MyFaces
>>>> >> >> >>>> >>
>>>> >> >> >>>> >
>>>> >> >> >>>>
>>>> >> >> >>>>
>>>> >> >> >>>> --
>>>> >> >> >>>>
>>>> >> >> >>>> http://www.irian.at
>>>> >> >> >>>>
>>>> >> >> >>>> Your JSF powerhouse - >>>> >> >> >>>> JSF Consulting, Develop= ment and
>>>> >> >> >>>> Courses in English and = German
>>>> >> >> >>>>
>>>> >> >> >>>> Professional Support fo= r Apache MyFaces
>>>> >> >> >>>
>>>> >> >> >>
>>>> >> >> >
>>>> >> >> >
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >> --
>>>> >> >>
>>>> >> >> http://www.irian.at
>>>> >> >>
>>>> >> >> Your JSF powerhouse -
>>>> >> >> JSF Consulting, Development and
>>>> >> >> Courses in English and German
>>>> >> >>
>>>> >> >> Professional Support for Apache MyFaces<= br> >>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >>
>>>> >> http://www.irian.at
>>>> >>
>>>> >> Your JSF powerhouse -
>>>> >> JSF Consulting, Development and
>>>> >> Courses in English and German
>>>> >>
>>>> >> Professional Support for Apache MyFaces
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> http://w= ww.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

--0015174c1c04ecfd94048c0959da--