Test if ui:insert has been defined in the template client
I am wondering if it is possible to know if ui:insert was defined in the ui:composition . I know that I can do it using separate ui:param , but just wanted to do it without in order to keep it simple and less error prone. Example : Template ... <ui:insert name="sidebar" /> <!-- Conditionnaly set the class according if sidebar is present or not --> <div class="#{sidebar is defined ? 'with-sidebar' : 'without-sidebar'}"> <ui:insert name="page-content" /> </div> ... Page 1 ... <ui:define name="sidebar"> sidebar content </ui:define> <ui:define name="page-content"> page content </ui:define> ...