Skip to content

Instantly share code, notes, and snippets.

@roamingthings
Created December 10, 2013 08:29
Show Gist options
  • Save roamingthings/7887359 to your computer and use it in GitHub Desktop.
Save roamingthings/7887359 to your computer and use it in GitHub Desktop.
Use a current jQuerry parallel to Richfaces 3.3 which brings its own (old) jQuery implementation which cannot be turned off even when not using any Richfaces component in a view.
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<f:view>
<head>
<ui:remove>********** Richfaces 3.3 / jQuery Voodoo Spell **********</ui:remove>
<script>
// Save jQuery from Richfaces resources
var $r = jQuery.noConflict();
</script>
<ui:remove>*** Load current jQuery</ui:remove>
<script src="https://code.jquery.com/jquery-latest.js"></script>
<ui:remove>
<!-- Alternatively load jQuery from context path -->
<script src="#{request.contextPath}/scripts/vendor/jquery.min.js"></script>
</ui:remove>
<script>
var $j = jQuery.noConflict();
var j$ = null;
</script>
<ui:remove>********** Richfaces 3.3 / jQuery Voodoo Spell **********</ui:remove>
</head>
<body>
<!--- Content goes here... --->
</body>
</f:view>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment