Re: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-09 Thread Leszek Gawron
Rice Yeh wrote: By reading the source code of cocoon-template-impl, I find it suports javascript expression. So I can use javascript to new java.util.Locale instance as the following: ?xml version=1.0? fd:selection-list xmlns:fd= http://apache.org/cocoon/forms/1.0#definition;

Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Rice Yeh
Hi, Is it supported to passing parameters to a method in an jexl _expression_ in CTemplate. I try the following _expression_, it is not supported.Is there other way?fd:label${country.toString(${locale})}/fd:label Regards,Rice

RE: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Robby Pelssers, AGP
Why don't you just do following ? fd:label${country.toString(locale)}/fd:label Robby -Oorspronkelijk bericht-Van: Rice Yeh [mailto:[EMAIL PROTECTED]Verzonden: vrijdag 8 september 2006 8:48Aan: dev@cocoon.apache.orgOnderwerp: Is it supported to passing parameters to a

Re: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Rice Yeh
I have tried it but toString(Locale locale) is just NOT invoked and a null value is returned.RiceOn 9/8/06, Robby Pelssers, AGP [EMAIL PROTECTED] wrote: Why don't you just do following ? fd:label${country.toString(locale)}/fd:label Robby -Oorspronkelijk bericht-Van: Rice Yeh

RE: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Robby Pelssers, AGP
Do you have locale available within the jx?? Otherwise you should try a print statement in your _javascript_ file. If this returns nothing, that explains a lot. print('Locale=' + Locale.getDefault().getLanguage()); Robby -Oorspronkelijk bericht-Van: Rice Yeh [mailto:[EMAIL

Re: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Leszek Gawron
Rice Yeh wrote: Hi, Is it supported to passing parameters to a method in an jexl expression in CTemplate. I try the following expression, it is not supported. Is there other way? fd:label${country.toString(${locale})}/fd:label Form definition is a static file. Meaning this won't work. You

Re: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Rice Yeh
I have found the reason. It is because the locale type in toString(Locale locale) is java.util.Locale. But the locale passed by LocaleAction is java.lang.String. Is there any way to convert the locale string to an instnace of java.util.Locale in CTemplate? The following is my ctemplate, in which

Re: Is it supported to passing parameters to a method in an jexl expression in CTemplate?

2006-09-08 Thread Rice Yeh
By reading the source code of cocoon-template-impl, I find it suports _javascript_ _expression_. So I can use _javascript_ to new java.util.Locale instance as the following: ?xml version=1.0?fd:selection-list xmlns:fd= http://apache.org/cocoon/forms/1.0#definition