1 2 Previous Next 20 Replies Latest reply on Aug 23, 2007 9:59 AM by ilya_shaikovsky

    Richfaces Calendar

    viggo.navarsete

      I'm playing with the new Calendar component on trunk, and I have a couple of questions:
      1. Is it possible to use an image as button instead of the text displayed with buttonLabel attribute?
      2. Why is there a Reset button next to the calendar button? I'm using this example calendar code:

      <rich:calendar
       id="calendar"
       data="#{calendarDataModel}"
       locale="#{calendarBean.locale}"
       popup="#{calendarBean.popup}"
       datePattern="#{calendarBean.pattern}"
       weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
       value="#{calendarBean.selectedDate}"
       currentDate="#{calendarBean.currentDate}"
       jointPoint="#{calendarBean.jointPoint}"
       direction="#{calendarBean.direction}"
       buttonLabel="PopUp"
       inputType="#{calendarBean.inputType}"
       boundaryDatesMode="#{calendarBean.boundary}">
       </rich:calendar>


        • 1. Re: Richfaces Calendar
          krasig

          Yeaaa. Good question.

          • 2. Re: Richfaces Calendar
            nbelaevski

            Hello!

            1) "buttonIcon" & "buttonIconDisabled" attributes could be used to define icons for button.

            2) Input field in popup mode is read-only, so reset button is necessary to reset date selection without opening the component

            • 3. Re: Richfaces Calendar
              viggo.navarsete

              Thanks for your response. Could you provide examples using the Calendar compontent without the reset button? I think it's very seldom you need a reset button. The user would rather have a writable input field, and just wipe out whatever date is in it.

              • 4. Re: Richfaces Calendar

                 

                "viggo.navarsete" wrote:
                Thanks for your response. Could you provide examples using the Calendar compontent without the reset button? I think it's very seldom you need a reset button. The user would rather have a writable input field, and just wipe out whatever date is in it.


                I made my own research other days and realized the interesting things:
                * All developers truly believe that Calendar component should look like a text filed and a button beside it for popup.
                * Most consumer sites have NO text field.

                • 5. Re: Richfaces Calendar

                   

                  "SergeySmirnov" wrote:

                  I made my own research other days and realized the interesting things:
                  * All developers truly believe that Calendar component should look like a text filed and a button beside it for popup.
                  * Most consumer sites have NO text field.

                  That is the only true way to be done...with a text field for input and a button besides it for a popup

                  • 6. Re: Richfaces Calendar
                    viggo.navarsete

                    I agree with tkalactomo, it looks strange to have two buttons, one for selecting a date and another one to remove it.
                    I guess most users are used to have a textfield which will be populated when selecting a date from the popup calendar, and just wipe out the content of the textfield if the date isn't correct.

                    • 7. Re: Richfaces Calendar

                       

                      "tkalactomo" wrote:
                      "SergeySmirnov" wrote:

                      I made my own research other days and realized the interesting things:
                      * All developers truly believe that Calendar component should look like a text filed and a button beside it for popup.
                      * Most consumer sites have NO text field.

                      That is the only true way to be done...with a text field for input and a button besides it for a popup


                      I guess, you are developer :-)

                      • 8. Re: Richfaces Calendar
                        viggo.navarsete

                        Any update how I can use the Calendar without the Reset button? Or, if I have to use it, how to skin it or replace it with an image?

                        • 9. Re: Richfaces Calendar

                          http://jira.jboss.com/jira/browse/RF-614

                          The bug has highest priority that might be.

                          • 10. Re: Richfaces Calendar
                            viggo.navarsete

                            Thanks Sergey, we wait for the beautiful result :)

                            • 11. Re: Richfaces Calendar

                               

                              "SergeySmirnov" wrote:
                              http://jira.jboss.com/jira/browse/RF-614

                              The bug has highest priority that might be.


                              Hi! I see that this bug has been fixed now in 3.1.0.
                              What attribute disable the reset button now in 3.1.0RC2?
                              Thanks!

                              • 12. Re: Richfaces Calendar
                                viggo.navarsete

                                I've just tried the Calendar component from the latest source code, and it pop-up like it should. The only problem now is that I have a simpleTogglePanel below the calendar, and the header of the simpleTogglePanel is placed in front of the calendar. It doesn't look pretty. Any reason why it act like this?

                                <div id="simpleSearchInputDiv">
                                 <r:panel>
                                 <f:facet name="header">
                                 <f:verbatim>Search</f:verbatim>
                                 </f:facet>
                                 <table>
                                 <tr>
                                 <td><h:outputText id="searchInputId" value="Search input"/></td>
                                 <td><h:inputText value="#{searchBean.searchString}" size="40"/></td>
                                 <td><h:commandButton action="#{searchBean.search}" value="Search"/></td>
                                 </tr>
                                 <tr>
                                 <td><h:outputText value="From"/></td>
                                 <td colspan="2">
                                 <r:calendar value="#{searchBean.searchFrom}" inputType="readonly" popup="true"/></td>
                                 </tr>
                                 <tr>
                                 <td><h:outputText value="To"/></td>
                                 <td colspan="2"><r:calendar value="#{searchBean.searchTo}" inputType="readonly" popup="true"/></td>
                                 </tr>
                                 </table>
                                 </r:panel>
                                 </div>
                                 <div id="advancedSearchInputDiv">
                                 <r:simpleTogglePanel opened="false" switchType="client" label="Advanced search options">
                                 <table>
                                 <tr>
                                 <td colspan="2"><h:selectBooleanCheckbox value="#{searchBean.searchEntity}"/><h:outputText value="Entities"/></td>
                                 </tr>
                                 <tr>
                                 <td colspan="2"><h:selectBooleanCheckbox value="#{searchBean.searchTBU}"/><h:outputText value="TBU"/></td>
                                 </tr>
                                 <tr>
                                 <td colspan="2"><h:selectBooleanCheckbox value="#{searchBean.searchPropertyValue}"/><h:outputText value="Property value"/></td>
                                 </tr>
                                 </table>
                                 </r:simpleTogglePanel>
                                 </div>


                                • 13. Re: Richfaces Calendar
                                  ilya_shaikovsky

                                  akira_ag:

                                  It was fixed but not included to RC2 check please more latest SNAPSHOT. There should be no reset button at all.

                                  viggo.navarsete

                                  Ok.. just one more our "standard" bugs with popup components. Will be fixed ASAP. :) Thanks.
                                  http://jira.jboss.com/jira/browse/RF-649

                                  • 14. Re: Richfaces Calendar
                                    viggo.navarsete

                                    Thanks ilya for quick response and great support! I will try to build richfaces from todays source code :)

                                    1 2 Previous Next