Page 5 of 11

Re: Design Discussions

Posted: 18 May 2012, 10:46
by tandraschko
ouputLabel sounds great. Could you also consider this issue: http://code.google.com/p/primefaces-ext ... ail?id=177 ?

ok, i will implement scriptCollector :)

Re: Design Discussions

Posted: 18 May 2012, 13:29
by cagatay.civici
I've already done #177 ;)

Re: Design Discussions

Posted: 18 May 2012, 13:54
by tandraschko
Fast as always, cool!

Re: Design Discussions

Posted: 18 May 2012, 13:54
by Oleg
Last I'd like to promote the requiredLabel functionality to PrimeFaces, with required label indicator and styling when validation fails.
Yes, this promotion sounds good. Looking forward to requiredLabel functionality in PrimeFaces !
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.
I'm in favour of async. script loading and execution. Tested LabJS, HeadJS and other libs. For instance HeadJS brings good performance http://headjs.com/test/script.html (only 5 scripts are included) but with LabJS I had much better results. This feature is easy to implement in PrimeFaces / PrimeFaces Extensions and it can make scriptCollector useless because all scripts are always loaded / executed parallel (don't matter where you place them - in head or bottom). There are only 2-3 wait points, after jquery and primefaces core script. Most scripts are independent. This task is planned for 0.6. We should research yet if small scripts are loaded / executed faster than one big. I can imagine that there is a "golden mean" - not all scripts should be merged (what is true in PF Extensions). And sure, this feature should be enableable per configuration.

Re: Design Discussions

Posted: 18 May 2012, 14:12
by tandraschko
Is this the task of scriptCollector?

I understand that the task is this:

before:

Code: Select all

$(function() { PrimeFaces.CW 1..... });
... some html...
$(function() { PrimeFaces.CW 2..... });
... some html...
$(function() { PrimeFaces.CW 3..... });
... some html...
$(function() { PrimeFaces.CW 4..... });
... some html...
$(function() { PrimeFaces.CW 5..... });
after:

Code: Select all

... some html...
$(function() { 
PrimeFaces.CW 1..... 
PrimeFaces.CW 2.....
PrimeFaces.CW 3.....
PrimeFaces.CW 4.....
PrimeFaces.CW 5.....
});

Re: Design Discussions

Posted: 18 May 2012, 14:21
by Oleg
Yes, this is the task. But not only that. All inline AND added to head scripts should be shifted to body (actually target="body" would be better but we don't have this).

Re: Design Discussions

Posted: 18 May 2012, 14:27
by tandraschko
Moving scripts includes from head to body is really much faster?
I would only collect all inline scripts, no includes.

Re: Design Discussions

Posted: 18 May 2012, 14:28
by Oleg
Test this self with three links on top http://headjs.com/test/script.html There is a little difference. "The key to high performance is to load without blocking. ".

P.S. Back to p:outputLabel. I can remember we have position attribute for star (*) in pe:requiredLabel. This could be important for arabic countries.

Re: Design Discussions

Posted: 18 May 2012, 14:31
by cagatay.civici
http://blog.primefaces.org/?p=1954

Regarding Arabic, I think there are more important things to do like rtl before positioning the required label.

Re: Design Discussions

Posted: 19 May 2012, 10:26
by cagatay.civici
I've replaced the showcase themeswitcher on top right with your themeswitcher images;

http://www.primefaces.org/showcase-labs/ui/home.jsf

Looks awesome! Thanks!