Assuming you are using Facelets, here's a relatively good solution:
- create
functions.taglib.xml in your WEB-INF
add a context param indicating the location:
facelets.LIBRARIES
/WEB-INF/functions.taglib.xml
In the xml put the following:
http://yournamespace.com/fnc
concat
com.yourpackage.utils.Functions
java.lang.String concat(java.lang.String, java.lang.String)
in the page use the following:
xmlns:fnc="http://yournamespace.com/fnc"
....
oncomplete="#{rich:component(fnc:concat(prefix, '_examinationPanel'))}.show();"
finally, in the Function class define the simple method:
public static String concat(String string1, String string2) {
return string1.concat(string2);
}