2 Replies Latest reply on Nov 10, 2007 6:06 AM by razieh

    a4j:loadStyle rendered not working

    jmiguel77

      hi

      i have a project using richfaces and facelets

      this is my template

      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich">
      <f:view>
       <head>
       <title><ui:insert name="pageTitle">SRI - Notificaciones y Valija</ui:insert></title>
       <a4j:loadStyle id="sriStyle" src="/css/sri.css" />
       <a4j:loadStyle id="printStyle" src="/css/print.css" />
       <a4j:loadStyle id="tablasStyle" src="/css/tablas.css" rendered="false" />
       <a4j:loadStyle id="alertasStyle" src="/css/alertas.css" rendered="false" />
       <a4j:loadStyle id="formulariosStyle" src="/css/formularios.css" rendered="false" />
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       </head>
       <body>
      <a4j:outputPanel id="mainOutputPanel" layout="block">
       <h1><ui:insert name="pageHeader">Page Header</ui:insert></h1>
       <p><ui:insert name="body">Page Body</ui:insert></p>
       <h1><ui:insert name="pageFooter">Page Footer</ui:insert></h1>
       </a4j:outputPanel>
       </body>
      </f:view>
      </html>
      


      i need to dinamically load the css files, so i was trying the rendered property to see if it works as it should

      the thing is that the rendered atribute is not working, the styles are always rendered even if i set them to "false"

      why ???