Localized Clock

UI Components for JSF
Post Reply
dwisantoso
Posts: 17
Joined: 05 Mar 2014, 09:27
Location: Jakarta, Indonesia
Contact:

29 Apr 2014, 06:42

Dear all,

I have looked
http://code.google.com/p/primefaces/sou ... .js?r=8366

I see that locale is involved within its code but why there is no locale attribute? Such as

Code: Select all

<p:clock pattern="E, dd-MMM-yyyy" locale="id_ID" />
I have tried this but it does not work.

Code: Select all

<p:clock pattern="EEE dd-MMM-yyyy HH:mm:ss" autoSync="true" mode="server">
  <f:attribute name="locale" value="id_ID" />
</p:clock>
Would you like to elaborate the solution?
Thank you
Using: Primefaces 4.0, Primefaces Extension 1.2.0, Apache Tomcat 7.0.37, Mojarra 2.2, JBoss 7.1.1 Final, Eclipse Juno/Kepler

kpp
Posts: 14
Joined: 28 Apr 2014, 15:58

29 Apr 2014, 09:25

You need to download your specific locale from here:

http://code.google.com/p/primefaces/wik ... cesLocales

This was mentioned here: http://forum.primefaces.org/viewtopic.php?f=3&t=15813

You put this code into some js-file and include it with something like this:

Code: Select all

[...]
<h:body>
<h:outputScript name="js/PrimeFaces.js" target="head" />
[...]
</h:body
[...]
PF 5.3.10
Wildfly 9.0.1 Final
JSF 2.2

dwisantoso
Posts: 17
Joined: 05 Mar 2014, 09:27
Location: Jakarta, Indonesia
Contact:

12 May 2014, 05:11

kpp, thank you for your answer yet it does not work. Maybe because it has no attribute locale ?

Nonetheless, I have implemented this locale for schedule component (http://forum.primefaces.org/viewtopic.php?f=3&t=37180) and it is working because it has attribute locale
Using: Primefaces 4.0, Primefaces Extension 1.2.0, Apache Tomcat 7.0.37, Mojarra 2.2, JBoss 7.1.1 Final, Eclipse Juno/Kepler

GrooveRage
Posts: 15
Joined: 26 Aug 2011, 22:41
Location: Montpellier, France

02 Jul 2015, 18:57

Hi,

I have inserted a clock in my application and I got same issue.

Does anyone found a fix to this ?

Thanks,
Groove

Edit:Ok it's working if we use <script type="text/javascript" src="js/locale.js" />
Tomcat 7.0.39 _/!\_ Mojarra 2.1.24 _/!\_ Primefaces 3.5 _/!\_ Omnifaces 1.5 _/!\_ JDK 7.0.21 _/!\_ Eclipse Juno _/!\_ Hibernate 4.2.4 _/!\_ JSTL 1.2.1 _/!\_ Log4j 2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests