4 Replies Latest reply on May 3, 2011 11:37 AM by Kike Gil

    popupPanel & calendar

    Kike Gil Novice

      I have a problem... inside the popupPanel i have a rich:calendar and a commandButtom to save the information, well, the problem is when i open rich:calendar and while it is open i pulse commandButtom, the popupPanel is close and it is not correct.

      Is there something to cancel the rich:calendar when i pulse commandButtom????

        • 1. popupPanel & calendar
          Ilya Shaikovsky Master

          you probably using h:commandButton. And after full page refresh popup no more shown . that's correct and not related to calendar presence. just use ajax button.

           

          If you believe I do not get some details - please add code snippets.

          • 2. Re: popupPanel & calendar
            iabughosh Master

            you can also use onclick="#{rich:component('popupPanel')}.show();return false;"

            • 3. popupPanel & calendar
              Kike Gil Novice

              <rich:popupPanel id="popup" modal="true" resizeable="false" moveable="true" autosized="true" width="900" top="250" domElementAttachment="form">

                 <f:facet name="header"><h:outputLabel value="Datos de la receta"/></f:facet>

                 <f:facet name="controls">

                    <a4j:commandButton image="/Imagenes/Cerrar2.gif" onclick="#{rich:component('popup')}.hide();"/>

                 </f:facet>

                   <a4j:outputPanel id="formReceta" ajaxRendered="true">

                         <rich:calendar id="FechaRecetaImpresa" mode="ajax" value="#{contingencia.receta.fechaRecetaImpresaDate}" datePattern="dd/MM/yyyy" enableManualInput="true" showApplyButton="false" />

                        <a4j:commandButton value="Save" actionListener="#{contingencia.validate}" oncomplete="#{contingencia.isValid ? 'incluirEnCarritoContingencias()':'return false;'}"/>

                     <a4j:jsFunction name="incluirEnCarritoContingencias" action="#{contingencia.incluirEnCarritoContingencias}" oncomplete="#{rich:component('popupReceta')}.hide();"/>

                   </a4j:outputPanel>

               

              My commandButtom is ajax, it shoud be only validate the popup and not close it

              • 4. popupPanel & calendar
                Kike Gil Novice


                i have seen that in a form happens the same:

                <h:form>

                     <a4j:outputPanel ajaxRendered="true">

                               <rich:calendar/>

                               <a4j:commandButtom value="openPopup" oncomplete="#{rich:component('popup')}.show()"/>

                     </a4j:outputPanel>

                </h:form>

                 

                 

                If i open rich:calendar, and later pulse the buttom, it not open the popup because refresh the page, but i don't know why do it...., it seems how if the form lost the focus when i open the calendar, some idea?