You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "milan durovic (Created) (JIRA)" <de...@myfaces.apache.org> on 2012/02/09 07:57:02 UTC

[jira] [Created] (TOMAHAWK-1611) t:inputCalendar does not create a pop-up

t:inputCalendar does not create a pop-up
----------------------------------------

                 Key: TOMAHAWK-1611
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1611
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Calendar
    Affects Versions: 1.1.11
         Environment: linux, mac osx
            Reporter: milan durovic


I have a date input part on a facelets driven page like this:'

      <t:inputCalendar value="${onesession.sessionDate}"
        id="session_date_input" forceId="true"
        size="12"
        popupButtonString="#{txt.date_button_label}"
        renderAsPopup="true" required="true" addResources="true"
        popupDateFormat="${event.dateFormat}"
        validator="#{event.validateSessionTime}">
        <f:convertDateTime locale="${facesContext.externalContext.request.locale}"
          timeZone="#{event.data.club.timezone}"
          dateStyle="short"
          type="date"
        />
      <t:message for="session_date_input"/>
      </t:inputCalendar>

When the button for activating popup is clicked on, nothing happens. I used FireBug to have a look and it appear that the wrong HTML element id for "input" field is passed to the Javascript function that gets called on a mouse click. This is what Firebug reveals:

<span id="session_date_input[0]">
<input id="session_date_input_input[0]" type="text" value="20/03/12" size="12" name="session_date_input[0]">
<span id="session_date_input[0]Span">
<script type="text/javascript">
<input type="button" value="Click here to edit date" onclick="session_5Fdate_5Finput_5B0_5DCalendarVar._popUpCalendar(this,document.getElementById('session_date_input[0]_input'),'d/MM/yy')">
</span>

As you can see, the second parameter to _popUpCalendar functions looks up an element that seems to have an extra "_input" at the end. It doesn't get located by getElementById and the function receives the second parameter as null, which that causes initialization error that I saw in Javascript console in Firebug.

FIX: I think if this extra "_input" in the HTML element id is removed from the lookup, it should work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TOMAHAWK-1611) t:inputCalendar does not create a pop-up

Posted by "Leonardo Uribe (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230876#comment-13230876 ] 

Leonardo Uribe commented on TOMAHAWK-1611:
------------------------------------------

I checked the component and I was able to reproduce the issue when forceId is set to true, but only when the component is inside a <t:dataTable> or <t:dataList>. When it is set to false it works as expected.

Note JSF 1.1. forceId feature was replaced by JSF 1.2 <h:form prependId="false"> . 

The problem is caused by a change done with a previous issue TOMAHAWK-1574. The fix is resolve the component id properly.
                
> t:inputCalendar does not create a pop-up
> ----------------------------------------
>
>                 Key: TOMAHAWK-1611
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1611
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.11
>         Environment: linux, mac osx
>            Reporter: milan durovic
>
> I have a date input part on a facelets driven page like this:'
>       <t:inputCalendar value="${onesession.sessionDate}"
>         id="session_date_input" forceId="true"
>         size="12"
>         popupButtonString="#{txt.date_button_label}"
>         renderAsPopup="true" required="true" addResources="true"
>         popupDateFormat="${event.dateFormat}"
>         validator="#{event.validateSessionTime}">
>         <f:convertDateTime locale="${facesContext.externalContext.request.locale}"
>           timeZone="#{event.data.club.timezone}"
>           dateStyle="short"
>           type="date"
>         />
>       <t:message for="session_date_input"/>
>       </t:inputCalendar>
> When the button for activating popup is clicked on, nothing happens. I used FireBug to have a look and it appear that the wrong HTML element id for "input" field is passed to the Javascript function that gets called on a mouse click. This is what Firebug reveals:
> <span id="session_date_input[0]">
> <input id="session_date_input_input[0]" type="text" value="20/03/12" size="12" name="session_date_input[0]">
> <span id="session_date_input[0]Span">
> <script type="text/javascript">
> <input type="button" value="Click here to edit date" onclick="session_5Fdate_5Finput_5B0_5DCalendarVar._popUpCalendar(this,document.getElementById('session_date_input[0]_input'),'d/MM/yy')">
> </span>
> As you can see, the second parameter to _popUpCalendar functions looks up an element that seems to have an extra "_input" at the end. It doesn't get located by getElementById and the function receives the second parameter as null, which that causes initialization error that I saw in Javascript console in Firebug.
> FIX: I think if this extra "_input" in the HTML element id is removed from the lookup, it should work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (TOMAHAWK-1611) t:inputCalendar does not create a pop-up

Posted by "Leonardo Uribe (Resolved) (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved TOMAHAWK-1611.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.12-SNAPSHOT
    
> t:inputCalendar does not create a pop-up
> ----------------------------------------
>
>                 Key: TOMAHAWK-1611
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1611
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.11
>         Environment: linux, mac osx
>            Reporter: milan durovic
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.12-SNAPSHOT
>
>
> I have a date input part on a facelets driven page like this:'
>       <t:inputCalendar value="${onesession.sessionDate}"
>         id="session_date_input" forceId="true"
>         size="12"
>         popupButtonString="#{txt.date_button_label}"
>         renderAsPopup="true" required="true" addResources="true"
>         popupDateFormat="${event.dateFormat}"
>         validator="#{event.validateSessionTime}">
>         <f:convertDateTime locale="${facesContext.externalContext.request.locale}"
>           timeZone="#{event.data.club.timezone}"
>           dateStyle="short"
>           type="date"
>         />
>       <t:message for="session_date_input"/>
>       </t:inputCalendar>
> When the button for activating popup is clicked on, nothing happens. I used FireBug to have a look and it appear that the wrong HTML element id for "input" field is passed to the Javascript function that gets called on a mouse click. This is what Firebug reveals:
> <span id="session_date_input[0]">
> <input id="session_date_input_input[0]" type="text" value="20/03/12" size="12" name="session_date_input[0]">
> <span id="session_date_input[0]Span">
> <script type="text/javascript">
> <input type="button" value="Click here to edit date" onclick="session_5Fdate_5Finput_5B0_5DCalendarVar._popUpCalendar(this,document.getElementById('session_date_input[0]_input'),'d/MM/yy')">
> </span>
> As you can see, the second parameter to _popUpCalendar functions looks up an element that seems to have an extra "_input" at the end. It doesn't get located by getElementById and the function receives the second parameter as null, which that causes initialization error that I saw in Javascript console in Firebug.
> FIX: I think if this extra "_input" in the HTML element id is removed from the lookup, it should work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TOMAHAWK-1611) t:inputCalendar does not create a pop-up

Posted by "David (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217114#comment-13217114 ] 

David commented on TOMAHAWK-1611:
---------------------------------

I have the seem issue,I removed "id" and "forceId" attributes but still not working
                
> t:inputCalendar does not create a pop-up
> ----------------------------------------
>
>                 Key: TOMAHAWK-1611
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1611
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.11
>         Environment: linux, mac osx
>            Reporter: milan durovic
>
> I have a date input part on a facelets driven page like this:'
>       <t:inputCalendar value="${onesession.sessionDate}"
>         id="session_date_input" forceId="true"
>         size="12"
>         popupButtonString="#{txt.date_button_label}"
>         renderAsPopup="true" required="true" addResources="true"
>         popupDateFormat="${event.dateFormat}"
>         validator="#{event.validateSessionTime}">
>         <f:convertDateTime locale="${facesContext.externalContext.request.locale}"
>           timeZone="#{event.data.club.timezone}"
>           dateStyle="short"
>           type="date"
>         />
>       <t:message for="session_date_input"/>
>       </t:inputCalendar>
> When the button for activating popup is clicked on, nothing happens. I used FireBug to have a look and it appear that the wrong HTML element id for "input" field is passed to the Javascript function that gets called on a mouse click. This is what Firebug reveals:
> <span id="session_date_input[0]">
> <input id="session_date_input_input[0]" type="text" value="20/03/12" size="12" name="session_date_input[0]">
> <span id="session_date_input[0]Span">
> <script type="text/javascript">
> <input type="button" value="Click here to edit date" onclick="session_5Fdate_5Finput_5B0_5DCalendarVar._popUpCalendar(this,document.getElementById('session_date_input[0]_input'),'d/MM/yy')">
> </span>
> As you can see, the second parameter to _popUpCalendar functions looks up an element that seems to have an extra "_input" at the end. It doesn't get located by getElementById and the function receives the second parameter as null, which that causes initialization error that I saw in Javascript console in Firebug.
> FIX: I think if this extra "_input" in the HTML element id is removed from the lookup, it should work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TOMAHAWK-1611) t:inputCalendar does not create a pop-up

Posted by "milan durovic (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204315#comment-13204315 ] 

milan durovic commented on TOMAHAWK-1611:
-----------------------------------------

if it's of any help, when I removed "id" and "forceId" attributes from the t:inputCalendar, the pop-up worked. So, I guess the bug must be somewhere in handling user-provided component ids or maybe forceId handling is not working as it should
                
> t:inputCalendar does not create a pop-up
> ----------------------------------------
>
>                 Key: TOMAHAWK-1611
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1611
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.11
>         Environment: linux, mac osx
>            Reporter: milan durovic
>
> I have a date input part on a facelets driven page like this:'
>       <t:inputCalendar value="${onesession.sessionDate}"
>         id="session_date_input" forceId="true"
>         size="12"
>         popupButtonString="#{txt.date_button_label}"
>         renderAsPopup="true" required="true" addResources="true"
>         popupDateFormat="${event.dateFormat}"
>         validator="#{event.validateSessionTime}">
>         <f:convertDateTime locale="${facesContext.externalContext.request.locale}"
>           timeZone="#{event.data.club.timezone}"
>           dateStyle="short"
>           type="date"
>         />
>       <t:message for="session_date_input"/>
>       </t:inputCalendar>
> When the button for activating popup is clicked on, nothing happens. I used FireBug to have a look and it appear that the wrong HTML element id for "input" field is passed to the Javascript function that gets called on a mouse click. This is what Firebug reveals:
> <span id="session_date_input[0]">
> <input id="session_date_input_input[0]" type="text" value="20/03/12" size="12" name="session_date_input[0]">
> <span id="session_date_input[0]Span">
> <script type="text/javascript">
> <input type="button" value="Click here to edit date" onclick="session_5Fdate_5Finput_5B0_5DCalendarVar._popUpCalendar(this,document.getElementById('session_date_input[0]_input'),'d/MM/yy')">
> </span>
> As you can see, the second parameter to _popUpCalendar functions looks up an element that seems to have an extra "_input" at the end. It doesn't get located by getElementById and the function receives the second parameter as null, which that causes initialization error that I saw in Javascript console in Firebug.
> FIX: I think if this extra "_input" in the HTML element id is removed from the lookup, it should work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira