4 Replies Latest reply on Feb 16, 2011 4:58 PM by Eric Ford

    Using rich:calender on rich:popupPanel

    Jens Mander Newbie

      Hi,

       

      I am trying to use the calender component inside of a popupPanel but it doesn't work like expected. The calender does not show up. Do I have to use the component in a different way wheather using it inside or outside a popupPanel?

      Here is a little snipped that demonstrates the misbehaviour.

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <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:rich="http://richfaces.org/rich">
      <f:view>
          <ui:insert name="metadata" />
          <h:head>
          </h:head>
          <h:body>
              <h:form>
                 <!-- Works perfectly -->
                  <rich:calendar value="#{testBean.date}" id="outerCal"
                      cellWidth="24px" cellHeight="22px" style="width:200px">
                  </rich:calendar>
                  <h:commandButton value="Call the popup">
                      <rich:componentControl target="popup" operation="show" />
                  </h:commandButton>
                  <rich:popupPanel id="popup" modal="false" autosized="true"
                      resizeable="false">
                      <f:facet name="header">
                          <h:outputText value="Simple popup panel" />
                      </f:facet>
                      <f:facet name="controls">
                          <h:outputLink value="#"
                              onclick="#{rich:component('popup')}.hide(); return false;">
                          X
                      </h:outputLink>
                      </f:facet>
                      <h:form>
                          <!-- Datepicker doesn't show up -->
                          <rich:calendar value="#{testBean.date}" id="innerCal"
                              cellWidth="24px" cellHeight="22px" style="width:200px">
                          </rich:calendar>
                      </h:form>
                  </rich:popupPanel>
              </h:form>
          </h:body>
      </f:view>
      </html>
      

       

      Regards

       

      Sascha