JSF need the getter method to read the values, and "ConstantValues" has to be a declared managed bean.

Glauco P. Gomes

Zmitko, Jan escreveu:
yes, you are right, the syntax was wrong. However it does not works. The constants I try to use are in a seperated .class file, because I use these not only in the bean(s). The constant class has many values and this is the reason why I try to use this without a getter. 
-----Ursprüngliche Nachricht-----
Von: Glauco P. Gomes [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 2. Oktober 2008 16:35
An: MyFaces Discussion
Betreff: Re: <trh:script text="">

The correct is #{ConstantValues.XXXX} not {#ConstantValues.XXXX}

Glauco P. Gomes

Guy Bashan escreveu:
It should be working fine.
1) did you try simply output the bean variable?
2) did you make sure your variable name in the bean also start with capital: getXXXX()?

Sent from my iPhone

On Oct 1, 2008, at 5:50 PM, "Zmitko, Jan" <[EMAIL PROTECTED]> wrote:

Hi,

how can use value of constants within the script tag, to define value of _javascript_ variables? The following syntax does not works?

<trh:script text="

       var RESULT ={#ConstantValues.XXXX};
   />

Best regards, Jan



Reply via email to