Design Discussions
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
This is a sticky topic to discuss collaboration between of PF core and PF extensions teams.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
PartialSubmit Feature,
Hey Extensions team, I've added partialSubmit feature to PrimeFaces ajax core targeting 3.3. which is false by default. Assume you have 100 input fields in a form and you only process a particular one with @this. By default JSF and PF ajax serializes all fields and sends them in post body, when partialSubmit is true, only viewstate and the inputs related to the partially processed fields are serialized. This helps to reduce network load as the post message will be smaller, for large pages this helps and for small pages not much.
When you have time, please see line 552;
http://code.google.com/p/primefaces/sou ... ore.js#552
Feedback is welcome!
Hey Extensions team, I've added partialSubmit feature to PrimeFaces ajax core targeting 3.3. which is false by default. Assume you have 100 input fields in a form and you only process a particular one with @this. By default JSF and PF ajax serializes all fields and sends them in post body, when partialSubmit is true, only viewstate and the inputs related to the partially processed fields are serialized. This helps to reduce network load as the post message will be smaller, for large pages this helps and for small pages not much.
When you have time, please see line 552;
http://code.google.com/p/primefaces/sou ... ore.js#552
Feedback is welcome!
Hello Cagatay,
Many thanks. We already know about this optimization We're tracking changes in SVN time to time. See this issue http://code.google.com/p/primefaces-ext ... ail?id=134
This is a good optimization. We're aware of that and will start with our work after 0.4.0. Keep you great work up!
Many thanks. We already know about this optimization We're tracking changes in SVN time to time. See this issue http://code.google.com/p/primefaces-ext ... ail?id=134
This is a good optimization. We're aware of that and will start with our work after 0.4.0. Keep you great work up!
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I also had to refactor impl code a bit to use jquery param which properly serializes the parameters. Glad to hear that you are monitoring the code base. Just a heads up, the params attribute in AjaxRequest is now an array like;
params: [{name:'x', value:10}, {name:'x', value:20}]
I'm also migrating
params: [{name:'x', value:10}, {name:'x', value:20}]
I'm also migrating
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Another thing I'd like to discuss, I have this idea to integrate jquery selectors to JSF components to use in update and process, e.g.
Updates all input components under the panel.
Update all enabled inputs
There is no end to this, I think this is a cool feature, what do you think?
On the client side, I'll run the query to find the elements, get the component clientIDs from them and send them in ajax request.
Updates all input components under the panel.
Code: Select all
update="@('.ui-panel :input')"
Code: Select all
update="@(':input:not(:disabled)')"
On the client side, I'll run the query to find the elements, get the component clientIDs from them and send them in ajax request.
params: [{name:'x', value:10}, {name:'x', value:20}] sounds good Just don't use new Array() please. And don't call push() on array, or call it as less as possible. I was last week on a workshop "High Performance Websites" and learned that this works very slow. Instead of new Array() we should use JSON notation [......]. This is faster. Notations are always faster than function calls and w/o overhead. And instead of push() we can use this pattern:
Also jQuery $.each is very slow. Look this test please (even for small count of elements) http://jsfiddle.net/martinaglv/NcRsV/ Quite normally for() or while() loops are preferable.
Code: Select all
var myArray = [....];
myArray[myArray.length] = newElement;
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
Hi Cagatay,
Feature for update="@('.ui-panel :input')" and update="@(':input:not(:disabled)')" are cool of course. But the problem could be a lot of partial CDATA sections in response and jQuery's update could be slow theoretically. At least from my point of view. If you select e.g. 100 elements to update, jQuery replaces 100 times DOM. I wanted to say, this way brings flexibility, but it should be used carefully. I don't see any usage at the monent, but we can add it I think.
Feature for update="@('.ui-panel :input')" and update="@(':input:not(:disabled)')" are cool of course. But the problem could be a lot of partial CDATA sections in response and jQuery's update could be slow theoretically. At least from my point of view. If you select e.g. 100 elements to update, jQuery replaces 100 times DOM. I wanted to say, this way brings flexibility, but it should be used carefully. I don't see any usage at the monent, but we can add it I think.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Yes it has pros and cons, as it is an optional feature, it could have its uses cases, thanks!
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Hi Cagatay,
partialSumbit is a great feature! But why not set it true as default?
Why do you need a feature to update multiple components? Do you have an use case for this?
Thanks,
Thomas
partialSumbit is a great feature! But why not set it true as default?
Why do you need a feature to update multiple components? Do you have an use case for this?
Thanks,
Thomas
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Not sure, maybe backward compatibility. There could be a context param to turn it on by default.partialSubmit is a great feature! But why not set it true as default?
I really don't have a use case for @(jquerySelector), just thought it would be cool.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest