Hi Cagatay,
I wanted to ask one design question. How about to generalize all menus in PrimeFaces? What I would like to see is "triggerEvent", "at", "my", etc. for MegaMenu. I want to show a multi-column menu at right click as context menu. Why do we need context menu as an extra component at all? We can add "event" attribute to quite normally menu. If event is "contextmenu" (valid jQuery event), a context menu is shown. Context menu can be a quite normally <p:menu position="dynamic" event="contextmenu" .../>. You can bind callbacks to "contextmenu" in jQuery. The same is for multi-column p:megaMenu. It's static at the moment and didn't allow to be shown at right click on p:dataTable e.g.
OpenFaces popup menu has a similar concept with "event" attribute.
What do you think? I will create a future request to point you to this problem.
Design Discussions
Last edited by Oleg on 19 Apr 2012, 16:03, edited 2 times in total.
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
Feature request created http://code.google.com/p/primefaces/iss ... il?id=3944
Waiting what you will say, what makes sense and what not.
Waiting what you will say, what makes sense and what not.
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've done many refactorings to menu components lately, will review these as well.
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Cagatay, just one question:
If you enhance the complete menu stuff, would it be possible to introduce an own renderer for menuItem's or submenu?
If menuItem's/subMenu's has a own renderer, following would be possible:
<p:menu>
<ui:repeat>
<p:submenu>
<ui:repeat>
<p:menuItem />
</ui:repeat>
</p:submenu>
</ui:repeat>
</p:menu>
IMO it's much "nicer" to use instead of MenuModel for such cases.
If you enhance the complete menu stuff, would it be possible to introduce an own renderer for menuItem's or submenu?
If menuItem's/subMenu's has a own renderer, following would be possible:
<p:menu>
<ui:repeat>
<p:submenu>
<ui:repeat>
<p:menuItem />
</ui:repeat>
</p:submenu>
</ui:repeat>
</p:menu>
IMO it's much "nicer" to use instead of MenuModel for such cases.
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:
That could be possible, I'll check, thanks.
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
cool, thanks!
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
Hi Cagatay,
I read today the last Java Magazin (german). It's about JSF 2.2 mostly. There is also an article about Web Perfomance and PrimeFaces. The author has done one interesting thing with custom ViewHandler, etc. I don't want to describe implementation, I just tell what he done and why. The goal was to re-attach all JS scripts (included in head) and generated by PrimeFaces inline scripts (placed after component markup) in the same order to body tag. He done following:
1) Shifted at runtime all ComponentResources for JS scripts (attached to UIView) from head to body.
2) Gather at runtime all inline scripts in renderers and shifted them to the body too - placed all at piece after JS scripts.
3) Measured perfomance with Webpagetest http://www.webpagetest.org/
As result he could achieve twice as much perfomance benefit for loading time. And more than twice perfomance benefit for document ready (when browser starts to render all stuff).
The question is now what do you think can you try to adjust @ResourceDependency for body target and put all inline scripts into Fake-Response-Writer in order to render them at body too? Browser will render pages faster definitely because it will not assume that scripts, included in head or inline in HTML, can affect DOM. This is valid for all browsers.
I read today the last Java Magazin (german). It's about JSF 2.2 mostly. There is also an article about Web Perfomance and PrimeFaces. The author has done one interesting thing with custom ViewHandler, etc. I don't want to describe implementation, I just tell what he done and why. The goal was to re-attach all JS scripts (included in head) and generated by PrimeFaces inline scripts (placed after component markup) in the same order to body tag. He done following:
1) Shifted at runtime all ComponentResources for JS scripts (attached to UIView) from head to body.
2) Gather at runtime all inline scripts in renderers and shifted them to the body too - placed all at piece after JS scripts.
3) Measured perfomance with Webpagetest http://www.webpagetest.org/
As result he could achieve twice as much perfomance benefit for loading time. And more than twice perfomance benefit for document ready (when browser starts to render all stuff).
The question is now what do you think can you try to adjust @ResourceDependency for body target and put all inline scripts into Fake-Response-Writer in order to render them at body too? Browser will render pages faster definitely because it will not assume that scripts, included in head or inline in HTML, can affect DOM. This is valid for all browsers.
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
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
2) can be done without changes on the renderer. AFAIR ADF has an component called scriptCollector?
I also created such an component a year ago but i deleted it - can't remember exactly
I also created such an component a year ago but i deleted it - can't remember exactly
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:
Sorry I'm still catching up after the break so will respond to the previous discussions soon.
I'm currently creating p:outputLabel to support advanced components like autocomplete, calendar whose input fields are not the client id, that part is done. I've also added support to set label of the input component using the value of the outputLabel so that we dont need to define label both in input component and label, I hate that. Last I'd like to promote the requiredLabel functionality to PrimeFaces, with required label indicator and styling when validation fails.
I'm currently creating p:outputLabel to support advanced components like autocomplete, calendar whose input fields are not the client id, that part is done. I've also added support to set label of the input component using the value of the outputLabel so that we dont need to define label both in input component and label, I hate that. Last I'd like to promote the requiredLabel functionality to PrimeFaces, with required label indicator and styling when validation fails.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I also had a scriptCollector once when I was working on Tomahawk Client side validations, frankly I don't have time to do it, but if you guys try this at extensions project if you have time, we can discuss further.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests