1 2 Previous Next 27 Replies Latest reply on Oct 4, 2007 4:46 AM by chawax Go to original post
      • 15. Re: Calendar month, year << < > >> not working
        chawax

        Thanks for your response.
        What do you mean when you say "surround your calendars with region" ? I am new to Richfaces, so I don't understand to which component you refer when you talk about "region".

        • 16. Re: Calendar month, year << < > >> not working
          j-pro

           

          "chawax" wrote:
          Thanks for your response.
          What do you mean when you say "surround your calendars with region" ? I am new to Richfaces, so I don't understand to which component you refer when you talk about "region".


          <a4j:region>
           <rich:calendar value="#{ligneDemandeAbsence.dateDebut}"
           datePattern="dd/MM/yyyy"
           popup="true"
           locale="#{locale}"
           enableManualInput="true" />
          </a4j:region>


          For more information on this tag see: http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone/docs/tlddoc/a4j/region.html

          All you need to successfully start with RichFaces is here: http://livedemo.exadel.com/richfaces-demo/

          • 17. Re: Calendar month, year << < > >> not working
            chawax

            OK. I surrounded the calendar component with a4J:region ... but unfortunately I still have the problem ! Maybe there are other components in my page that could cause this problem ?

            • 18. Re: Calendar month, year << < > >> not working
              j-pro

              Have you visited the links I gave you above? There are some requirements for using tags, and recommendations. Try to read it in sections of a4j:region and rich:calendar. There are code examples also, where everything is clear. (thanks to these good people who did it)

              • 19. Re: Calendar month, year << < > >> not working
                chawax

                Yes, I visited them (by the way, it's a very good work compared to other Ajax frameworks I tried) but I could not find anything wrong in the way I use it.

                Note I found a way to workaround this bug temporarily : I set popup property to false, then the calendar works perfect ...

                • 20. Re: Calendar month, year << < > >> not working
                  ilya_shaikovsky

                  So paste your final snippet please.

                  • 21. Re: Calendar month, year << < > >> not working
                    chawax

                    So my final snippet is like this :

                    <html
                     xmlns:s="http://jboss.com/products/seam/taglib"
                     xmlns:ui="http://java.sun.com/jsf/facelets"
                     xmlns:f="http://java.sun.com/jsf/core"
                     xmlns:h="http://java.sun.com/jsf/html"
                     xmlns:rich="http://richfaces.org/rich"
                     xmlns:a4j="http://richfaces.org/a4j">
                    
                    <ui:composition template="templates/template.xhtml">
                    <ui:define name="body">
                     <rich:messages />
                     <rich:panel>
                     <f:facet name="header">Demande d'absence - Sélection de la période</f:facet>
                     <h:form id="demande">
                     <h:panelGrid columns="2">
                     <h:outputText value="Date de début :" />
                     <a4j:region>
                     <rich:calendar value="#{ligneDemandeAbsence.dateDebut}"
                     datePattern="dd/MM/yyyy"
                     popup="false"
                     locale="#{locale}"
                     enableManualInput="true"
                     />
                     </a4j:region>
                    
                     <h:outputText value="Valorisation de début :" />
                     <h:inputText id="valorisationDebut" value="#{ligneDemandeAbsence.valorisationDebut}" required="true" />
                    
                     <h:outputText value="Date de fin :" />
                     <a4j:region>
                     <rich:calendar value="#{ligneDemandeAbsence.dateFin}"
                     datePattern="dd/MM/yyyy"
                     popup="false"
                     locale="#{locale}"
                     enableManualInput="true"
                     />
                     </a4j:region>
                    
                     <h:outputText value="Valorisation de fin :" />
                     <h:inputText id="valorisationFin" value="#{ligneDemandeAbsence.valorisationFin}" required="true" />
                    
                     </h:panelGrid>
                     <h:commandButton id="cmdSuivant" value="Suivant" action="suivant" />
                     </h:form>
                     </rich:panel>
                    </ui:define>
                    </ui:composition>
                    </html>


                    When I set popup to "true", I can't change month on Firefox 2.0.0.7 ... but I have colleagues that access my JBoss server and that can go only to past months, but no to future months ! Very strange, isn't it ?

                    Thanks for your help :)

                    • 22. Re: Calendar month, year << < > >> not working
                      marinew

                      Hello,

                      I don't know whether I meet the same problem or not.
                      I am using <rich:calendar> from RichFaces 3.1.0.
                      I have a problem when calendar popup appears an inputText or InputTextArea : when I want to click on a date or other buttons ("<<", "<", ...), it doesn't work, because it give focus to the inputText that is hidden behind this button of calendar popup. If there is no input component behind, links work well and I can choose a date.
                      I have the problem in Firefox 2.0.0.7, but it works in IE 7.0.5730.11

                      Is it a bug ? How can I solve this please ?
                      Thanks

                      • 23. Re: Calendar month, year << < > >> not working
                        marinew

                        I forgot to tell that :
                        - the popup calendar doesn't display at right place (it should display just under the date input zone).
                        - the <rich:calendar> is inside a <rich:simpleTogglePanel>, that is inside a <rich:panel>. And there are others <rich:simpleTogglePanel> and <rich:panel> on this page.
                        - I don't see any JavaScript error.

                        On another page with a rich:calendar (more simple page, with a <rich:panel>), popup calendar display just under date input, and I have no problem with popup calendar due to other inputText.

                        On this more simple page, I tried to replace <rich:panel> with <rich:simpleTogglePanel>, and it still work correctly.

                        Thanks for any help.

                        • 24. Re: Calendar month, year << < > >> not working
                          dmitry.demyankov

                          2 marinew
                          Can you post your code here?

                          2 chawax
                          Maybe there's something else that's causing the problem with the calendar?

                          I've got

                          <rich:calendar
                           id="education_diploma_issuedate_calendar"
                           value="#{editEducationInfoPage.diploma.issueDate}"
                           popup="true"
                           enableManualInput="true"
                           datePattern="dd.MM.yyyy"/>

                          on my page and it works fine even not surrounded by a4j:region...

                          • 25. Re: Calendar month, year << < > >> not working
                            chawax

                             

                            "dmitry.demyankov" wrote:
                            Maybe there's something else that's causing the problem with the calendar?

                            Thanks dmitry. You are right : I investigated further and it looks like templating is what causes my problem. It works when I don't use template in my JSF.

                            My template is like this (the JSF with the calendar component is included in in body part) :

                            <!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:s="http://jboss.com/products/seam/taglib">
                            <head>
                             <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                             <title>eTemptationIV</title>
                             <link href="#{facesContext.externalContext.request.contextPath}/css/theme.css" rel="stylesheet" type="text/css" />
                            </head>
                            <body>
                             <ui:include src="menu.xhtml">
                             <ui:param name="projectName" value="eTemptation 4"/>
                             </ui:include>
                             <div class="body">
                             <ui:insert name="body"/>
                             </div>
                            </body>
                            </html>


                            Can you see something wrong that could cause my problem ?
                            Or is it a bug with Richfaces ?

                            • 26. Re: Calendar month, year << < > >> not working
                              dmitry.demyankov

                              I'm not that familiar with facelets so I can't tell whether your ui:include is correct or not..
                              Can you try including your template with a4j:include - it works fine for me :)

                              • 27. Re: Calendar month, year << < > >> not working
                                chawax

                                I'm not familiar with a4j:include, I can't understand how you can do the same than facelet template.

                                Anyway, I really think it is a bug since the problem exists for FF 2, and not for IE 6. So I filed a JIRA for this : http://jira.jboss.com/jira/browse/RF-1065

                                1 2 Previous Next