3 Replies Latest reply on Jan 29, 2009 9:52 AM by Scott Robidoux

    Calendar not rerendering on a4j button

    Scott Robidoux Newbie

      We are having a problem with the rerendering of the rich:calendar object on an a4j submit. The form submits correctly and the text field is rerendered correctly, but the calendar field locks up and can't be changed. We are using RichFaces 3.2.2 with JBoss 4.3 CP03 FP1. If I set the calendars to popup="false", the calendars completely disappear on rerender.

      According to https://jira.jboss.org/jira/browse/RF-3507, the issue has been resolved.

      The following is the JSF code:

      <a4j:region>
       <rich:comboBox id="techNm" disabled="#{ReqBean_SR.readOnly}" value="${ReqBean_SR.currAssignedTechNm}" suggestionValues="#{ReqBean_SR.activeTechNms}" directInputSuggestions="true" defaultLabel="Enter Tech Name" selectFirstOnUpdate="false">
       <a4j:support event="onchanged" reRender="output, techNm" />
       </rich:comboBox>
       <rich:calendar id="techInDate" showWeeksBar="false" disabled="#{ReqBean_SR.readOnly}" value="#{ReqBean_SR.currAssignedTechIn}" enableManualInput="false" datePattern="MM/dd/yyyy" />
       <rich:calendar id="techOutDate" showWeeksBar="false" disabled="#{ReqBean_SR.readOnly}" value="#{ReqBean_SR.currAssignedTechOut}" enableManualInput="false" datePattern="MM/dd/yyyy" />
       <rich:spacer width="10" />
       <br />
       <h:outputText id="output" value="Rerendering..." rendered="#{not empty Request_SR.currAssignedTechNm}" />
       <rich:spacer height="10" />
       <br />
       <a4j:commandButton id="addTechButton"
       value="#{nav.addAssignedTech}"
       action="#{ReqBean_SR.addTech}"
       process="techNm, techInDate, techOutDate"
       type="button"
       ajaxSingle="true"
       limitToList="true"
       styleClass="rich-button"
       disabled="#{ReqBean_SR.readOnly}"
       reRender="assignedTechs, techNm, techInDate, techOutDate, assignedTechMsg"
       ignoreDupResponses="true">
       </a4j:commandButton>
       </a4j:region>


      The (relevant) backing bean code is:
      private String currAssignedTechNm;
       private Date currAssignedTechIn;
       private Date currAssignedTechOut;
       private Set<AssignedTechnician> currTechs;
       private SerializableListDataModel techs;
       private List<String> activeTechNms;
      ...
      public void addTech()
       {
       AssignedTechnician at = new AssignedTechnician();
      
       LOG.debug(currAssignedTechNm+" : In: "+currAssignedTechIn+" : Out: "+currAssignedTechOut);
      
       Technician tech = techMgr.getTechByName(currAssignedTechNm);
      
       at.setTechnician(tech);
       at.setInDate(currAssignedTechIn);
       at.setOutDate(currAssignedTechOut);
      
       if (currTechs == null)
       {
       currTechs = new HashSet<AssignedTechnician>();
       }
      
       currTechs.add(at);
      
       LOG.debug("List of current assigned techs:");
       for (AssignedTechnician assTech : currTechs)
       {
       LOG.debug(assTech.getTechnician().getName()+" : In: "+assTech.getInDate()+" : Out: "+assTech.getOutDate());
       }
      
       currAssignedTechNm = null;
       currAssignedTechIn = null;
       currAssignedTechOut = null;
       }


      Any ideas what is happening?