Not able to force ADF application to use regional-fr settings

Hi all

I use jdeveloper 11.1.1.7.0 version.

My form of ADF's human form task resulted in bpmn.

I want to set the locale English use English regardless of the language of browsers.

And also use the number format according to the English.

I added the code below in faces-config. XML

<locale-config>
<default-locale>en</default-locale>
<supported-locale>es</supported-locale>
</locale-config>

to force them to use English, I did the changes below.

JSPX Code:

<f:view beforePhase="#{AccountDistribution.onload}" locale="en-US">


Corresponding Java Bean:

public void onload(PhaseEvent phaseEvent) {
    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
    if (phaseEvent.getPhaseId().equals(phaseEvent.getPhaseId().RENDER_RESPONSE)) {
        if (!adfFacesContext.isPostback()) {          
                  Locale enLocale =  new Locale("en","US");                                    
                  FacesContext context = FacesContext.getCurrentInstance();
                  context.getViewRoot().setLocale(enLocale);              
        }
    }    
  }

Essential is to maintain the quantity in English American format.

  <af:inputText value="#{bindings.INVOICE_AMOUNT.inputValue}"
                                            simple="true"
                                            required="true"                                         
                                            id="it7"
                                            autoSubmit="true"
                                            requiredMessageDetail="Gross Amount should not be blank"
                                            binding="#{AccountDistribution.grossAmtIT}">
                               <af:convertNumber type="number"   locale="en-US"
                                                    minFractionDigits="2"
                                                    maxFractionDigits="2" />
    </af:inputText>

But after you set it if my language Spanish browsers then it is not forcing amount to be in US format.

If I enter 12345678.44, then it automatically converts the number of 1,234,567,844.00 and also error message indicates that it is not a valid number.

If I go 1234.44 she converts 1,230.00

I want to put amount WE is independent of the browser language format.

Hi all

Thank you for your help.

This problem has been resolved.

I made below jspx page changes:

simple = 'true '.

required = "true".

columns = "#{bindings." INVOICE_AMOUNT.hints.DisplayWidth}.

maximumLength = "#{bindings." INVOICE_AMOUNT.hints.precision}.

shortDesc = "#{bindings." INVOICE_AMOUNT.hints.ToolTip}.

ID = "IT7."

autoSubmit = 'true '.

partialTriggers = "IT7."

requiredMessageDetail = "amount gross must not be empty.

Binding = "#{AccountDistribution.grossAmtIT}" > "

minFractionDigits = '2 '.

maxFractionDigits = "2" / >

the faces configuration file :

en

are

Tags: Java

Similar Questions

Maybe you are looking for