You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2008/09/02 01:18:46 UTC

[jira] Commented: (TOMAHAWK-1183) inputCalendar setfocus not working

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627550#action_12627550 ] 

Leonardo Uribe commented on TOMAHAWK-1183:
------------------------------------------

comparing shared trunk 2.0.x with 3.0.x it seems that onfocus and onblur where added on 3.0.x Html.EVENT_HANDLER_ATTRIBUTES_WITHOUT_ONCLICK array. So, it is necessary to check is some side effects happens when this patch is applied on trunk 2.0.x (remember shared 2.0.x is used by myfaces core and tomahawk)

> inputCalendar setfocus not working
> ----------------------------------
>
>                 Key: TOMAHAWK-1183
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1183
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6
>         Environment: windows xp
>            Reporter: richard lee
>         Attachments: tomahawk-1183.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The inputCalendar tag / component is not rendering javascript entered for the setfocus property. I'm attempting to add some custom javascript to the setfocus of an inputcalendar to be run when the user clicks in the input box associated with the calendar, but this is being ignored during the redering of the input box. The only javascript that gets rendered is the "standard" javascript , i.e. onfocus="selectText('null', 'con9n')".
> I believe the issue is in HtmlTextHelpRenderer:
> if(isSelectText(component))
>             {
>                 HtmlRendererUtils.renderHTMLAttributes(writer, component,
>                                                        HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_ONFOCUS_AND_ONCLICK);
>                 writer.writeAttribute(HTML.ONFOCUS_ATTR,
>                                       HtmlInputTextHelp.JS_FUNCTION_SELECT_TEXT + "('" +
>                                       getHelpText(component) + "', '" + id +"')", null);
>                 writer.writeAttribute(HTML.ONCLICK_ATTR,
>                                       HtmlInputTextHelp.JS_FUNCTION_SELECT_TEXT + "('" +
>                                       getHelpText(component) + "', '" + id +"')", null);
>             }
> when writing out the HTML.ONFOCUS_ATTR is should write out any user specified onfocus attributes as well as the standard ones.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.