You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Chad Lyon (JIRA)" <de...@myfaces.apache.org> on 2006/08/03 21:06:13 UTC

[jira] Created: (TOMAHAWK-581) Focus component cannot focus controls within a subview.

Focus component cannot focus controls within a subview.
-------------------------------------------------------

                 Key: TOMAHAWK-581
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-581
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.5-SNAPSHOT
            Reporter: Chad Lyon
            Priority: Minor
         Attachments: FocusPatch_08-03-2006.diff

The focus control only searches it's parent UINamingContainer for the control with "id" as specified by the "for" attribute.  Therefore controls contained in subviews cannot be focused by the focus control.  There is a work around for this (see below) but an optimal solution would be to have the focus control ascend to the HTMLForm component and search all UINamingContainers for the control with "id" as specified by the "for" attribute.

The work around involves removing the Exception thrown by the focus component when a search for the control with "id" as specified in the "for" attribute fails.  By doing this you can place a focus control in the parent UINaming container as well as in all subviews and the focus component that finds the control will be the one that generates the javascript to focus the control it found.  A patch for the workaround is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TOMAHAWK-581) Focus component cannot focus controls within a subview.

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-581?page=comments#action_12428418 ] 
            
Mike Kienenberger commented on TOMAHAWK-581:
--------------------------------------------

Chad,  I'd rather not apply a workaround when you have a better solution.   By the way, I'd amend your algorithm to search for a form Family member rather than a UIForm or HtmlForm component -- there is at least one non-UIForm form component out there in ADFFaces/Trinidad.

Also, this workaround will hide real errors where there is no control with the id specified.


> Focus component cannot focus controls within a subview.
> -------------------------------------------------------
>
>                 Key: TOMAHAWK-581
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-581
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.5-SNAPSHOT
>            Reporter: Chad Lyon
>            Priority: Minor
>         Attachments: FocusPatch_08-03-2006.diff
>
>
> The focus control only searches it's parent UINamingContainer for the control with "id" as specified by the "for" attribute.  Therefore controls contained in subviews cannot be focused by the focus control.  There is a work around for this (see below) but an optimal solution would be to have the focus control ascend to the HTMLForm component and search all UINamingContainers for the control with "id" as specified by the "for" attribute.
> The work around involves removing the Exception thrown by the focus component when a search for the control with "id" as specified in the "for" attribute fails.  By doing this you can place a focus control in the parent UINaming container as well as in all subviews and the focus component that finds the control will be the one that generates the javascript to focus the control it found.  A patch for the workaround is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (TOMAHAWK-581) Focus component cannot focus controls within a subview.

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-581?page=all ]

Martin Marinschek resolved TOMAHAWK-581.
----------------------------------------

    Fix Version/s: 1.1.4-SNAPSHOT
       Resolution: Fixed
         Assignee: Martin Marinschek

With your proposed optimal solution, you'll essentially make the id-handling of JSF invalid - you cannot have more than one component of the same id in different forms then.

I've reduced the exception to a warning though.

regards,

Martin

> Focus component cannot focus controls within a subview.
> -------------------------------------------------------
>
>                 Key: TOMAHAWK-581
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-581
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.5-SNAPSHOT
>            Reporter: Chad Lyon
>         Assigned To: Martin Marinschek
>            Priority: Minor
>             Fix For: 1.1.4-SNAPSHOT
>
>         Attachments: FocusPatch_08-03-2006.diff
>
>
> The focus control only searches it's parent UINamingContainer for the control with "id" as specified by the "for" attribute.  Therefore controls contained in subviews cannot be focused by the focus control.  There is a work around for this (see below) but an optimal solution would be to have the focus control ascend to the HTMLForm component and search all UINamingContainers for the control with "id" as specified by the "for" attribute.
> The work around involves removing the Exception thrown by the focus component when a search for the control with "id" as specified in the "for" attribute fails.  By doing this you can place a focus control in the parent UINaming container as well as in all subviews and the focus component that finds the control will be the one that generates the javascript to focus the control it found.  A patch for the workaround is attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira