2 Replies Latest reply on May 25, 2008 8:52 AM by nbelaevski

    script error while using rich:calendar

    ankitak

      Hi
      I have a situation where initially i need to show the date in some label format and then when i click on the label the rich:calendar shud get rendered.But i am facing a problem that when i first time click on the label (which i have specified as input text in my case) i get some javascript error saying jOldQuery is undefined when i try to debug it shows error in some rich faces jar file. Can someone tell why is this happening and how can it be resolved. I'am also pasting the code for reference

      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">


      <f:view>

      <h:form>
      <a4j:outputPanel id="result" ajaxRendered="true">
      <c:set var="expression1" value="#{model.flag}" />

      <c:set var="availDate" value="#{production.availDate}" />
      <c:if test="${expression1=='false'}" >
      <h:inputText id="sisterTerritoryRelDate" value="#{production.availDate}" style="border: thin dotted">
      <a4j:support event="onclick" actionListener="#{model.switchFlag}" reRender="result">
      </a4j:support>
      </h:inputText>
      </c:if>
      <c:if test="${expression1=='true'}">
      <rich:calendar datePattern="dd-MMM-yyyy" value="#{production.availDate}" >
      <a4j:support event="oninputclick" actionListener="#{model.switchFlag}" reRender="result">
      </a4j:support>
      </rich:calendar>
      </c:if>

      </a4j:outputPanel>

      </h:form>

      </f:view>