2 Replies Latest reply on Feb 23, 2009 6:41 AM by Alan Gross

    AJAX Hide / Display Calendar on Radio selection

    Alan Gross Newbie

      I would like to provide some radio inputs. On a specific radio selected ("date_selection") I want to display a calendar object. It is not working yet. Is it possible, that backing-bean values are not refreshed while ajax-rerendering? Here is the example code:

      <h:panelGrid class="vertical-menu-cell" columnClasses="optionList"
       columns="1" cellspacing="0" cellpadding="0">
       <h:outputText value="Select Filter Option" />
       <h:selectOneRadio value="#{timerepHandler.filterOption }">
       <a4j:support event="onclick" reRender="calendar" />
       <f:selectItem itemLabel="All open" itemValue="open_all" />
       <f:selectItem itemLabel="Date Selection" itemValue="date_selection" />
       <f:selectItem itemLabel="Current Month" itemValue="current_month" />
       <f:selectItem itemLabel="By Project" itemValue="by_project" />
       </h:selectOneRadio>
      
       <a4j:outputPanel id="calendar" layout="block" ajaxRendered="true">
       <rich:calendar value="#{timerepHandler.selectedDate}" rendered="#{timerepHandler.filterOption }=='date_selection'" locale="en"
       popup="false" datePattern="dd.MM.yyyy" showApplyButton="false"
       cellWidth="24px" cellHeight="22px" style="width:200px"/>
       </a4j:outputPanel>
       </h:panelGrid>
      


      Thank you very much for a hint!
      Greets
      Alan