You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matt Cooper (JIRA)" <de...@myfaces.apache.org> on 2007/10/05 22:06:50 UTC
[jira] Created: (TRINIDAD-757) partialTriggers Contract Fails if
direct parent component is not a NamingContainer
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.2.2-core, 1.0.3-core
Reporter: Matt Cooper
Assignee: Matt Cooper
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.
[jira] Commented: (TRINIDAD-757) partialTriggers Contract Fails if
direct parent component is not a NamingContainer
Posted by "Andrew Robinson (JIRA)" <de...@myfaces.apache.org>.
[ 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.
[jira] Resolved: (TRINIDAD-757) partialTriggers Contract Fails if
direct parent component is not a NamingContainer
Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeanne Waldman resolved TRINIDAD-757.
-------------------------------------
Resolution: Fixed
changed documentation, demo, and RequestContextImpl.java
Completed: At revision: 587555
on trunk
trinidad-build\src\main\resources\META-INF\maven-faces-plugin\components\trinidad\core\CoreMessages.xml
trinidad-build\src\main\resources\META-INF\maven-faces-plugin\components\trinidad\core\includes\CommonAttrs.xml
trinidad-examples\trinidaddemo\src\main\webapp\demos\pprDemos.jspx
trinidad-impl\src\main\java\org\apache\myfaces\trinidadinternal\context\RequestContextImpl.java
trinidad-impl\src\main\xrts\org\apache\myfaces\trinidadinternal\resource\LoggerBundle.xrts
> 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: Jeanne Waldman
> 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.
[jira] Issue Comment Edited: (TRINIDAD-757) partialTriggers
Contract Fails if direct parent component is not a NamingContainer
Posted by "Matt Cooper (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532765 ]
mattcooper edited comment on TRINIDAD-757 at 10/5/07 2:34 PM:
---------------------------------------------------------------
This test page has 4 buttons:
- button 1 is what all of the other buttons' partialTriggers will be pointing to
- button 2's partialTrigger works, has the incorrect number of colons, and has a direct NamingContainer parent
- button 3's partialTrigger fails, has the incorrect number of colons, and has a direct non-NamingContainer parent
- button 4's partialTrigger works, has the correct number of colons, and has a direct non-NamingContainer parent
When you run the page and click on any of the buttons, you will see an error logged to the console like this:
Oct 5, 2007 2:04:50 PM org.apache.myfaces.trinidadinternal.context.RequestContextImpl addPartialTriggerListeners
WARNING: Could not find partial trigger :::button1WrapperA:button1WrapperB:button1 from CoreCommandButton[UIXFacesBeanImpl, id=button3]
This is wrong, Andrew and I feel that button 2 and 3's partialTriggers should fail.
was (Author: mattcooper):
This test page has 4 buttons:
- button 1 is what all of the other buttons' partialTriggers will be pointing to
- button 2's partialTrigger works, has the correct number of colons, and has a direct NamingContainer parent
- button 3's partialTrigger fails, has the correct number of colons, and has a direct non-NamingContainer parent
- button 4's partialTrigger works, has the incorrect number of colons, and has a direct non-NamingContainer parent
When you run the page and click on any of the buttons, you will see an error logged to the console like this:
Oct 5, 2007 2:04:50 PM org.apache.myfaces.trinidadinternal.context.RequestContextImpl addPartialTriggerListeners
WARNING: Could not find partial trigger :::button1WrapperA:button1WrapperB:button1 from CoreCommandButton[UIXFacesBeanImpl, id=button3]
This is wrong, button 3's partialTrigger should work. Instead, the error should be for button 4.
> 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.
[jira] Commented: (TRINIDAD-757) partialTriggers Contract Fails if
direct parent component is not a NamingContainer
Posted by "Matt Cooper (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564193#action_12564193 ]
Matt Cooper commented on TRINIDAD-757:
--------------------------------------
Note Andrew logged an RI bug against UIComponent's findComponent API:
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=690
> 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: Jeanne Waldman
> 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.
[jira] Commented: (TRINIDAD-757) partialTriggers Contract Fails if
direct parent component is not a NamingContainer
Posted by "Jeanne Waldman (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TRINIDAD-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565913#action_12565913 ]
Jeanne Waldman commented on TRINIDAD-757:
-----------------------------------------
That findComponent bug wasn't really a bug.
Also, note that a new bug is logged requesting a simpler way to reference partialTriggers.
https://issues.apache.org/jira/browse/TRINIDAD-936
> 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: Jeanne Waldman
> 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.