jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: [jsr344-experts mirror] Re: PPS Discussion

From: Werner Punz <werner.punz_at_gmail.com>
Date: Thu, 31 May 2012 15:55:26 +0200

Hi see my comments below

Am 31.05.12 15:34, schrieb Andy Schwartz:
> On 5/31/12 8:35 AM, Kito Mann wrote:
>> +1 on this. It was actually a client requirement that drove its
>> implementation in PrimeFaces. The issue is currently targeted for 2.2
>> (http://java.net/jira/browse/JAVASERVERFACES-1841),
>
> The corresponding spec issue is here:
>
> http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-723
>
> Note that Ted raises an additional requirement:
>
>> tedgoddard added a comment - 21/Apr/11 10:12 AM
>> This is a very good feature provided that there is also a "whitelist"
>> of additional parameters that must be submitted with every Ajax post.
>> Alternatively, a JavaScript callback could be registered to allow
>> frameworks to add required parameters to the POST before submission.
>
> Do either MyFaces or PrimeFaces address this?
>
Actually for MyFaces I think yes (i have to double check the code for a
precise statement here), the pass through parameters in the options are
added.
This is afair standard jsf.js behavior for normal submits and are not
different for the pps case. Aka every option which is not a standard option
like execute, render etc... is seen as server side passthrough and is
sent down the server as well as additional parameter.

An additional callback would make sense maybe the existing events
already can be reused for the callback.
(Gotta check the code for that)


> Minor API comment: I would prefer that we go with an enum-based value
> rather than a boolean - ie. I would prefer something like:
>
> - submit = partial/full
>
> Over:
>
> - pps = true/false
>
> Andy
>
Either way is fine with me.


>> so we just need to make sure it's completed for 2.2
>>
>> On Thu, May 31, 2012 at 5:48 AM, Çağatay Çivici
>> <cagatay.civici_at_gmail.com <mailto:cagatay.civici_at_gmail.com>> wrote:
>>
>> Hi,
>>
>> The general feedback I received from community after adding
>> partialsubmit to PrimeFaces is that "This should be a core JSF
>> feature" so I totally agree with Werner.
>>
>> Here is a working example of what Werner described;
>>
>> http://www.primefaces.org/showcase-labs/ui/partialSubmit.jsf
>>
>> Regards,
>>
>> On 31.May.2012, at 10:05, Werner Punz wrote:
>>
>>> Hello Everyone
>>>
>>> Just a minor question because Primefaces added that feature and
>>> MyFaces had it as a config option for ages.
>>> But I personally think this is a feature which should be part of
>>> the spec not part of implementation features or component
>>> set features.
>>>
>>> PPS Ajax submit
>>>
>>> As for now we encode the entire form for the execute parts and
>>> send it down.
>>> Wouldn´t just from a minor performance and traffic perspective
>>> it being better just to send the components
>>> which actually are executed.
>>>
>>> aka
>>>
>>> <h:form>
>>> <h:inputText id="component1" .../>
>>> <h:inputText id="component2" .../>
>>> <h:inputText id="component3" .../>
>>>
>>> ....
>>> <h:commandButton ...>
>>> <f:ajax execute="component1" render="..."
>>> </h:commandButton>
>>>
>>> this currently encodes component1, component2 and component 3 +
>>> the viewstate and whatever is in the form
>>>
>>> While in the pps case we only would encode component1 and the
>>> viewstate
>>>
>>> Now this should not be the default behavior because it would
>>> probably break the backwards compatibility in some corner cases
>>> but how about <f:ajax ... pps="true" /> which enables this.
>>> I think if you have a bigger number of input components then
>>> this could give some performance improvement.
>>> The good side also is that most of the heavy lifting would be on
>>> the Javascript side of things.
>>>
>>>
>>>
>>> Werner
>>>
>>>
>>
>> *Çağatay Çivici*
>> Principal Consultant
>> PrimeFaces Lead | JSF EG Member
>>
>> Prime Teknoloji
>> Bilkent Cyberpark, A-303d
>> 06800 Ankara/Turkey
>> Tel: +90 312 265 05 07 <tel:%2B90%20312%20265%2005%2007>
>> http://www.prime.com.tr
>>
>>
>