3 Replies Latest reply on Nov 14, 2009 6:07 AM by pkatta

    Unable to User rich:calendar if i am using templates

    pkatta
      Hi,

      I am using templates in my application.

      I am using template as follows,


      <f:view contentType="text/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:s="http://jboss.com/products/seam/taglib">

           <html>
           <!-- Page Head-->
           <ui:insert name="head"/>

           <body>
           <div id="canvas">
           <div id="content">
           
           <!-- Page Header-->
           <ui:insert name="header" />
           
           <div id="mainContent">
           <div id="leftContent">
                <ui:insert name="leftmenu" />
           </div>
           <div id="container">
           <div id="midContent"><ui:insert name="content" /></div>
           </div>
           </div>
           <br class="clear" />
           <!-- /main content -->
           <div id="footer">Copyright 2009 RVR</div>
           <!-- /footer--></div>
           <!-- /content --></div>
           </body>
           </html>
      </f:view>


      The page where i am using rich:calendar

      <ui:composition 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:s="http://jboss.com/products/seam/taglib"
           xmlns:a="http://richfaces.org/a4j"
           xmlns:c="http://java.sun.com/jstl/core"
           xmlns:rich="http://richfaces.org/rich" template="/templates/template.xhtml">
           
           <!-- Page Head -->
           <ui:define name="head">
                <ui:include src="/templates/headtemplate.xhtml">
                     <ui:param name="pageTitle"
                          value="Raad voor Rechtsbijstand / Mijn RVR Nieuwe aanvraag" />
                </ui:include>
           </ui:define>
           
           <!-- Left Menu -->
           <ui:define name="leftmenu">
                <ui:include src="/templates/menutemplate.xhtml" />
           </ui:define>

           <!-- Page Header -->
           <ui:define name="header">
                <ui:include src="/templates/headertemplate.xhtml" />
           </ui:define>
           
           <!-- content -->
           <ui:define name="content">
                  ...
                  ......
                  
                  <div class="row">
      <div class="label">Date of Birth<h:outputText value="*" /></div>
      <div class="infoIcon"><img src="images/information.png" alt="info"/></div>
      <div class="textboxCont">
      <rich:calendar id="dateOfBirth" value="#{person.dateOfBirth}" enableManualInput="true" datePattern="dd/MM/yyyy" immediate="true" required="true" requiredMessage="OprichtingsDatum is een verplicht veld." popup="true" />
      </div>
      <br class="clear" />
      </div>
                 ......
                 ...
           </ui:define>
      </ui:composition>


      If am using the rich:calendar it show calendar but not able to open caledar and select the date. I am putting rich:calendar in between <ui:insert name="content" />.

      I tried it by removing template it shows calendar and i am able to select date.

      Please let me know whats wrong i am doing here or steps to work rich:caledar with template.

      Thanks and Regards,
      Pravin Katta