How to call Javascript function in JSF EL conditionally?
Posted
by Paul
on Stack Overflow
See other posts from Stack Overflow
or by Paul
Published on 2010-04-06T12:40:01Z
Indexed on
2010/04/06
12:53 UTC
Read the original article
Hit count: 538
I have to call Javascript funtion based on the bean value. i use the following code
onmouseover="#{occasionBean.user.userPreference.defaultPreview==true?'':'Tip()'})"
I need to send some parameters in Tip() like this
Tip('<img src="pics/image.jpg" width="60">')
Error i am getting is javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: com.sun.faces.el.impl.parser.ParseException: Encountered "test" at line 1, column 60. Was expecting one of: "}" ... "." ... ">" ... "gt" ... "<" ... "lt" ... "==" ... "eq" ... "<=" ... "le" ... ">=" ... "ge" ... "!=" ... "ne" ... "[" ... "+" ... "-" ... "*" ... "/" ... "div" ... "%" ... "mod" ... "and" ... "&&" ... "or" ... "||" ... "?" ... '
© Stack Overflow or respective owner