Skip to content

Instantly share code, notes, and snippets.

@ghermeto
Created August 9, 2011 15:11
Show Gist options
  • Save ghermeto/1134315 to your computer and use it in GitHub Desktop.
Save ghermeto/1134315 to your computer and use it in GitHub Desktop.
JSF 2 composite component will throw a IllegalArgumentException with Mojarra 2.0.3+ (http://java.net/jira/browse/JAVASERVERFACES-1849)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<!-- INTERFACE -->
<composite:interface>
<composite:attribute name="for" required="true"/>
<composite:attribute name="rendered" default="true"/>
</composite:interface>
<!-- IMPLEMENTATION -->
<composite:implementation>
<h:outputScript name="jsf.js" library="javax.faces" target="head"/>
<h:outputScript name="scripts/components.js" target="head" />
<script type="text/javascript">
busystatus.init("#{cc.clientId}", "#{cc.attrs.for}");
</script>
<span id="#{cc.clientId}" style="display:none;padding-left:8px">
<h:graphicImage id="busyindicator" name="/images/ajax-loader.gif"/>
</span>
</composite:implementation>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment