Skip to content

Instantly share code, notes, and snippets.

@pauldijou
Created May 2, 2012 18:33
Show Gist options
  • Save pauldijou/2579027 to your computer and use it in GitHub Desktop.
Save pauldijou/2579027 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el"
xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core"
xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite">
<cc:interface>
<cdk:class>org.richfaces.bootstrap.renderkit.NavbarRenderer</cdk:class>
<cdk:superclass>org.richfaces.bootstrap.renderkit.NavbarRendererBase</cdk:superclass>
<cdk:renderer-type>org.richfaces.bootstrap.NavbarRenderer</cdk:renderer-type>
<cdk:renders-children>true</cdk:renders-children>
</cc:interface>
<cc:implementation>
<cdk:object type="org.richfaces.bootstrap.component.AbstractNavbar" name="navbar"
value="#{castComponent(component)}"/>
<div id="#{clientId}" class="navbar #{navbar.fixed ne null and !navbar.fixed.equals('') ? 'navbar-fixed-'.concat(navbar.fixed) : ''}">
<div class="navbar-inner">
<div class="container">
<c:if test="#{navbar.isCollapsible()}">
<a class="btn btn-inverse btn-navbar" data-toggle="collapse" data-target="##{clientId}_collapse">
<c:choose>
<c:when test="#{component.getFacet('collapsedMenu') != null and component.getFacet('collapsedMenu').rendered}">
<cdk:call expression="renderCollapsedMenuFacet(facesContext, component)" />
</c:when>
<c:otherwise>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</c:otherwise>
</c:choose>
</a>
</c:if>
<c:choose>
<c:when test="#{component.getFacet('brand') != null and component.getFacet('brand').rendered}">
<cdk:call expression="renderBrandFacet(facesContext, component)" />
</c:when>
<c:when test="#{component.attributes['brand']!= null and not component.attributes['brand'].equals('')}">
<span class="brand">#{navbar.brand}</span>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="#{navbar.isCollapsible()}">
<div id="#{clientId}_collapse" class="nav-collapse">
<cdk:call expression="encodeChildren(facesContext, component)"/>
</div>
</c:when>
<c:otherwise>
<cdk:call expression="encodeChildren(facesContext, component)"/>
</c:otherwise>
</c:choose>
</div>
</div>
</div>
</cc:implementation>
</cdk:root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment