Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1409

t:inputCalendar java script problem: org_apache_myfaces_PopupCalendar() is undefined

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Invalid
    • Affects Version/s: 1.1.8
    • Fix Version/s: None
    • Component/s: Calendar
    • Labels:
      None

      Description

      Hi,

      I am using a t:inputCalendar tag from Tomahawk 1.1.8:
      view plaincopy to clipboardprint?
      <t:inputCalendar id="mycal"
      addResources="false"
      monthYearRowClass="yearMonthHeader"
      weekRowClass="weekHeader"
      popupButtonStyleClass="standard_bold"
      currentDayCellClass="currentDayCell"
      value="#

      {BB.geburtsdatum}"
      renderAsPopup="true"
      popupTodayString="Heute ist der: "
      helpText="MM/DD/YYYY">
      </t:inputCalendar>
      <h:outputText value="#{BB.geburtsdatum}

      " />
      <t:inputCalendar id="mycal"
      addResources="false"
      monthYearRowClass="yearMonthHeader"
      weekRowClass="weekHeader"
      popupButtonStyleClass="standard_bold"
      currentDayCellClass="currentDayCell"
      value="#

      {BB.geburtsdatum}"
      renderAsPopup="true"
      popupTodayString="Heute ist der: "
      helpText="MM/DD/YYYY">
      </t:inputCalendar>
      <h:outputText value="#{BB.geburtsdatum}

      " />

      geburtsdatum is a DATE in my BB with its getter and setter.
      The t:inputCalendar is embedded in an form.
      When I open the JSF Page with Internet Explorer 6 I get the following JavaScript error:
      view plaincopy to clipboardprint?
      org_apache_myfaces_PopupCalendar() is undefined
      org_apache_myfaces_PopupCalendar() is undefined

      I read a lot on the web, and tryed to use the command addResources="false" in combination with
      the extension filter in my web.xml:
      view plaincopy to clipboardprint?
      <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>
      <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>

      My page source code look like this:
      view plaincopy to clipboardprint?
      <input id="frm1:mycal" name="frm1:mycal" type="text" onfocus="selectText('MM/DD/YYYY', 'frm1:mycal')" onclick="selectText('MM/DD/YYYY', 'frm1:mycal')" value="MM/DD/YYYY" /><span id="frm1:mycalSpan"></span><script type="text/javascript"><!--
      frm1_3AmycalCalendarVar=new org_apache_myfaces_PopupCalendar();
      frm1_3AmycalCalendarVar.initData.themePrefix = "jscalendar-DB";
      frm1_3AmycalCalendarVar.initData.imgDir = "/ewc/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12385048/calendar.HtmlCalendarRenderer/DB/";
      frm1_3AmycalCalendarVar.initData.monthName = new Array("Januar","Februar","M\u00E4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
      frm1_3AmycalCalendarVar.initData.dayName = new Array("Mo","Di","Mi","Do","Fr","Sa","So");
      frm1_3AmycalCalendarVar.initData.startAt = 1;
      frm1_3AmycalCalendarVar.dateFormatSymbols.weekdays = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
      frm1_3AmycalCalendarVar.dateFormatSymbols.shortWeekdays = new Array("So","Mo","Di","Mi","Do","Fr","Sa");
      frm1_3AmycalCalendarVar.dateFormatSymbols.shortMonths = new Array("Jan","Feb","M\u00E4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");
      frm1_3AmycalCalendarVar.dateFormatSymbols.months = new Array("Januar","Februar","M\u00E4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
      frm1_3AmycalCalendarVar.dateFormatSymbols.eras = new Array("v. Chr.","n. Chr.");
      frm1_3AmycalCalendarVar.dateFormatSymbols.ampms = new Array("AM","PM");
      frm1_3AmycalCalendarVar.initData.todayString = "Heute ist der: ";
      frm1_3AmycalCalendarVar.initData.popupLeft = false;

      frm1_3AmycalCalendarVar.initData.selectMode = "day";
      frm1_3AmycalCalendarVar.init(document.getElementById('frm1:mycalSpan'));

      //--></script><input type="button" onclick="frm1_3AmycalCalendarVar._popUpCalendar(this,document.getElementById('frm1:mycal'),'dd.MM.yy')" value="..." class="standard_bold" /></div>
      <input id="frm1:mycal" name="frm1:mycal" type="text" onfocus="selectText('MM/DD/YYYY', 'frm1:mycal')" onclick="selectText('MM/DD/YYYY', 'frm1:mycal')" value="MM/DD/YYYY" /><span id="frm1:mycalSpan"></span><script type="text/javascript"><!--
      frm1_3AmycalCalendarVar=new org_apache_myfaces_PopupCalendar();
      frm1_3AmycalCalendarVar.initData.themePrefix = "jscalendar-DB";
      frm1_3AmycalCalendarVar.initData.imgDir = "/ewc/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12385048/calendar.HtmlCalendarRenderer/DB/";
      frm1_3AmycalCalendarVar.initData.monthName = new Array("Januar","Februar","M\u00E4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
      frm1_3AmycalCalendarVar.initData.dayName = new Array("Mo","Di","Mi","Do","Fr","Sa","So");
      frm1_3AmycalCalendarVar.initData.startAt = 1;
      frm1_3AmycalCalendarVar.dateFormatSymbols.weekdays = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
      frm1_3AmycalCalendarVar.dateFormatSymbols.shortWeekdays = new Array("So","Mo","Di","Mi","Do","Fr","Sa");
      frm1_3AmycalCalendarVar.dateFormatSymbols.shortMonths = new Array("Jan","Feb","M\u00E4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");
      frm1_3AmycalCalendarVar.dateFormatSymbols.months = new Array("Januar","Februar","M\u00E4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
      frm1_3AmycalCalendarVar.dateFormatSymbols.eras = new Array("v. Chr.","n. Chr.");
      frm1_3AmycalCalendarVar.dateFormatSymbols.ampms = new Array("AM","PM");
      frm1_3AmycalCalendarVar.initData.todayString = "Heute ist der: ";
      frm1_3AmycalCalendarVar.initData.popupLeft = false;

      frm1_3AmycalCalendarVar.initData.selectMode = "day";
      frm1_3AmycalCalendarVar.init(document.getElementById('frm1:mycalSpan'));

      //--></script><input type="button" onclick="frm1_3AmycalCalendarVar._popUpCalendar(this,document.getElementById('frm1:mycal'),'dd.MM.yy')" value="..." class="standard_bold" /></div>

      Is it possible, that there is no path found for creating the instance in the java script:
      view plaincopy to clipboardprint?

      frm1_3AmycalCalendarVar=new org_apache_myfaces_PopupCalendar();

      frm1_3AmycalCalendarVar=new org_apache_myfaces_PopupCalendar();

      Anyone any idea, why this can't be found?
      Thanks,

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              klaus1 Klaus Schuster
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: