Recently, in a EL expression (using #{}
), I have tried to pass a String
parameter delimited by double quotes as first parameter of a java method using following code
<p:panel style="border:none;#{vC.traceUpdate("p:panel")}">
but this line is refused because double quote are use to limit style
attibute and to limit traceUpdate
parameter.
I have found an easy solution that consist to use simple quote instead of double quote to limit style
attribute as show in following code
<p:panel style='border:none;#{vC.traceUpdate("p:panel")}'>
But what do happening if first method's parameter type is String
and next parameter's type is char
as show in following code ?
<p:panel style='border:none;#{vC.traceUpdate("p:panel",'X')}'>
In this extreme situation, it is not more possible to exchange quote and double quote.
I have tried followed code, but this is refused (highlight in red on Intellij-Idea) and crashes application !
<p:panel style="border:none;#{vC.traceUpdate(\"p:panel\",'X')}">
How can I solve this problem ?
This question is not a duplicate because my question explicitely explain that problem is linked to double quotes ... and my question is how to pass a String AND a Char to a java method in EL expression