MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-1515

f:ajax event not triggered inside t:calendar

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.10-SNAPSHOT
    • Fix Version/s: 1.1.10
    • Component/s: Calendar, JSF2
    • Labels:
      None
    • Environment:
      Win XP, JDK 1.6.0.20, Tomcat 6.0.24, MyFaces 2.0.1 - Snapshots (api + impl), Tomahawk20-1.1.10 Snapshot

      Description

      I've modified the tomahawk 2.0 example so that I have a birthday input field (t:calendar) and an age input field (t:inputText). If someone puts in a birthday date the ajax event should be triggered and calculate the age.

      If I use a calendar the ajax event isn't working whereas with a simple inputText it's working (see code snippets below).

      Not working example with t:calendar:
      <t:inputCalendar id="birthday"
      monthYearRowClass="yearMonthHeader"
      weekRowClass="weekHeader"
      popupButtonStyleClass="standard_bold"
      currentDayCellClass="currentDayCell"
      value="#

      {testBean.birthday}"
      renderAsPopup="true"
      popupTodayString="#{example_messages['popup_today_string']}"
      popupDateFormat="dd.MM.yyyy"
      popupWeekString="#{example_messages['popup_week_string']}"
      forceId="true">
      <f:ajax event="valueChange" render="age"/>
      </t:inputCalendar>
      <t:inputText id="age"
      value="#{testBean.age}"
      title="Age"
      />

      Working example with t:inputText:
      <t:inputText id="birthday"
      value="#{testBean.birthday}

      "
      title="#

      {lbl.edit_data_title_personal_birthday}

      ">
      <f:ajax event="valueChange" render="age"/>
      </t:inputText>
      <t:inputText id="age"
      value="#

      {testBean.age}

      "
      title="Age"
      />

      Is this a bug or am I misunderstanding the f:ajax use case?

        Issue Links

          Activity

          Hide
          Leonardo Uribe added a comment -

          It is a bug. Really we are on the "middle" of solve TOMAHAWK-1474, so this one is part of that issue.

          Show
          Leonardo Uribe added a comment - It is a bug. Really we are on the "middle" of solve TOMAHAWK-1474 , so this one is part of that issue.
          Hide
          Oliver Bayer added a comment -

          Hi Leonardo,

          sorry, I didn't find the related issue while searching for an already reported calendar issue. Thanks for clarify.
          Until the bugfix is committed I'll use the inputText element.

          Greets Oli

          Show
          Oliver Bayer added a comment - Hi Leonardo, sorry, I didn't find the related issue while searching for an already reported calendar issue. Thanks for clarify. Until the bugfix is committed I'll use the inputText element. Greets Oli
          Hide
          Oliver Bayer added a comment -

          Hi Leonardo,

          thanks for committing the bugfix for this ticket.
          My example with the calendar and the ajax event is working perfectly now.

          Just FYI:
          Tomcat logs the following error 22 times on console during/after each ajax event but as I said before it's working anyway.

          30.07.2010 23:32:18 org.apache.tomcat.util.http.Parameters processParameters
          WARNING: Parameters: Invalid chunk '' ignored.

          Oli

          Show
          Oliver Bayer added a comment - Hi Leonardo, thanks for committing the bugfix for this ticket. My example with the calendar and the ajax event is working perfectly now. Just FYI: Tomcat logs the following error 22 times on console during/after each ajax event but as I said before it's working anyway. 30.07.2010 23:32:18 org.apache.tomcat.util.http.Parameters processParameters WARNING: Parameters: Invalid chunk '' ignored. Oli
          Hide
          Leonardo Uribe added a comment -

          Hi Oliver

          Are you using a latest copy of myfaces core (from trunk?). I think maybe a change committed on MYFACES-2840 is causing this effect but I'm not sure.

          best regards,

          Leonardo

          Show
          Leonardo Uribe added a comment - Hi Oliver Are you using a latest copy of myfaces core (from trunk?). I think maybe a change committed on MYFACES-2840 is causing this effect but I'm not sure. best regards, Leonardo
          Hide
          Oliver Bayer added a comment -

          Hi,

          I've tested it with the trunk build from today (myfaces api/impl 2.0.2 snapshot and tomahawk20-1.1.10 snapshot). If you tell me where to start I can maybe help with debugging.

          Greets Oli

          Show
          Oliver Bayer added a comment - Hi, I've tested it with the trunk build from today (myfaces api/impl 2.0.2 snapshot and tomahawk20-1.1.10 snapshot). If you tell me where to start I can maybe help with debugging. Greets Oli
          Hide
          Leonardo Uribe added a comment -

          Hi Oliver

          Checking again it is not related to MYFACES-2840. It seems to be a problem related to the params sended by the javascript part on ajax request, that when it is parsed by tomcat show this warning.

          I tried some demos for ajax part (only jsf 2.0) and the request params are correct. To see what was sent use firebug. I'll try it to see what happen.

          regards,

          Leonardo

          Show
          Leonardo Uribe added a comment - Hi Oliver Checking again it is not related to MYFACES-2840 . It seems to be a problem related to the params sended by the javascript part on ajax request, that when it is parsed by tomcat show this warning. I tried some demos for ajax part (only jsf 2.0) and the request params are correct. To see what was sent use firebug. I'll try it to see what happen. regards, Leonardo
          Hide
          Oliver Bayer added a comment -

          Hi Leonardo,

          with firebug I couldn't find a param which wasn't correct but I didn't had the time to really dig into.

          With the current build of myfaces trunk (without re-compiling tomahawk) the warnings are gone. I didn't have time to test it since monday but maybe the commit from today (MYFACES-2855) which changed some js files fixed the issue.

          Thanks a lot for your help.

          Oli

          Show
          Oliver Bayer added a comment - Hi Leonardo, with firebug I couldn't find a param which wasn't correct but I didn't had the time to really dig into. With the current build of myfaces trunk (without re-compiling tomahawk) the warnings are gone. I didn't have time to test it since monday but maybe the commit from today ( MYFACES-2855 ) which changed some js files fixed the issue. Thanks a lot for your help. Oli

            People

            • Assignee:
              Leonardo Uribe
              Reporter:
              Oliver Bayer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development