الجمعة، 17 أبريل 2020

How to set locale for af:chooseDate at runtime?

How to set locale for af:chooseDate at runtime?




af:chooseDate Component depend on the region and languages options in the client , so sometime the user need to change that according to his  language, we discuss  how we can set date according to selectedlanguage .


1.by Calendar.getAvailableLocales() function the af:selectOneChoice  display  all available countries   ,first value is the default country.

2.On valueChangeListener event, ChangLocale function will be change default locale to selected country.

FacesContext context = FacesContext.getCurrentInstance
) context.getViewRoot().setLocale(lang




3.af:chooseDate  will revalidate when the user change default country .we set partialTriggers  to countries combox id .





Thanks &Regards

ليست هناك تعليقات:

إرسال تعليق

ADF: Programmatic View Object Using Ref Cursor.

ADF: Programmatic View Object Using Ref Cursor. Posted by:  Manish Pandey   April 25, 2013   in  ADF   Leave a comment   3758 Views Sometime...