You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org> on 2007/10/05 22:41:50 UTC

[jira] Commented: (TRINIDAD-757) partialTriggers Contract Fails if direct parent component is not a NamingContainer

    [ https://issues.apache.org/jira/browse/TRINIDAD-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532770 ] 

Andrew Robinson commented on TRINIDAD-757:
------------------------------------------

I just looked into this with Matt, and the behavior does not match the JavaDoc for the partialTriggers attribute. According to the documentation, the ID should be relative to the source component. However, the method:

RequestContextImpl.addPartialTriggerListeners(UIComponent listener, String[] triggers)

is not using the component, but rather the parent of the source component as shown:

UIComponent master = ComponentUtils.findRelativeComponent(listener.getParent(), trigger);

If this was changed to match the documentation, Matt's use case should fail for buttons 2 and 3 and only button 4 should work. 

The question now becomes how many users are dependent on this broken behavior. If this is a valid concern, then perhaps we need to change it, but keep the old behavior if the first check fails. This could be a deprecated behavior for one release?


> partialTriggers Contract Fails if direct parent component is not a NamingContainer
> ----------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-757
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-757
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 1.0.3-core, 1.2.2-core
>            Reporter: Matt Cooper
>            Assignee: Matt Cooper
>         Attachments: partialTriggers.jspx
>
>
> The definition of partialTriggers is:
> The IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component, and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root, or multiple colons to move up through the NamingContainers - "::" will search from the parent naming container, ":::" will search from the grandparent naming container, etc.
> I am seeing that the multiple-colon use case will work as long as the direct parent component is a NamingContainer.  If the direct parent component is not a NamingContainer then one additional colon is incorrectly required to make it work.  I will upload a test page that demonstrates this shortly.

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