Hello, I'm having troubles with EL and javascript functions (JSF 1.2, Facelets, Richfaces 3.3.0GA). I have a page that includes another composition:
<ui:include src="/pages/panels/examinationPanel.xhtml">
<ui:param name="prefix" value="new" />
And in my ui:composition
I want to append the prefix
to every id. For example:
<rich:modalPanel id="#{prefix}_examinationPanel">
That works ok.
But the problem comes when I want to access the components in functions suchs as oncomplete
I cannot get it to concatenate the strings properly. For example
oncomplete="#{rich:component('#{prefix}_examinationPanel')}.show();"
I've tried with fn:join
as well but it does not execute the function because it complains about errors when it finds "#" character. For example:
oncomplete="#{rich:component(fn:join(#{prefix},'examinationPanel'))}.show()"
throws
SEVERE: Servlet.service() for servlet Faces Servlet threw exception org.apache.el.parser.ParseException: Encountered "fn:join( #" at line 1, column 33.
Encountered "fn:join( #"
Different errors if I brace it with brackets or with # and brackets.
What am I doing wrong?
And another question, in a conditional command like
oncomplete="#{a}?#{b}:#{c}"
How can I "group" to be able to execute more actions when true or false? Por example something like this:
oncomplete="#{a}?(#{b}#{f}):(#{c}#{d}#{e})"
I've tried with parenthesis but does not parse it properly.
Thanks in advance.