Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 2.0-Beta2
-
Fix Version/s: None
-
Component/s: Framework
-
Labels:None
-
Environment:Found with Liferay 6.0 + PortletFaces-Bridge 2.0.0-BETA3 but it's not portlet related.
Description
I have a JSF 2 Facelet composite component wrapping ice:dataTable like this:
<my-comp:dataPaginator for=":myData" />
<ice:dataTable id="myData">
</ice:dataTable>
The colon in front of :myData indicates that the search should start from the root of the tree. Sadly, CoreComponentUtils.findComponent(UIComponent, String) is bailing out too early, not recursing through the component tree enough to find a matching clientId.
Here's a patch to fix:
===================================================================
--- /icefaces-src/2.0-trunk/icefaces/compat/core/src/main/java/com/icesoft/util/CoreComponentUtils.java (revision 23550)
+++ /icefaces-src/2.0-trunk/icefaces/compat/core/src/main/java/com/icesoft/util/CoreComponentUtils.java (working copy)
@@ -162,6 +162,12 @@
component = child;
break;
}
+ if (component == null) {
+ component = findComponent(child, componentId);
+ if (component != null) {
+ break;
+ }
+ }
}
return component;
}
<my-comp:dataPaginator for=":myData" />
<ice:dataTable id="myData">
</ice:dataTable>
The colon in front of :myData indicates that the search should start from the root of the tree. Sadly, CoreComponentUtils.findComponent(UIComponent, String) is bailing out too early, not recursing through the component tree enough to find a matching clientId.
Here's a patch to fix:
===================================================================
--- /icefaces-src/2.0-trunk/icefaces/compat/core/src/main/java/com/icesoft/util/CoreComponentUtils.java (revision 23550)
+++ /icefaces-src/2.0-trunk/icefaces/compat/core/src/main/java/com/icesoft/util/CoreComponentUtils.java (working copy)
@@ -162,6 +162,12 @@
component = child;
break;
}
+ if (component == null) {
+ component = findComponent(child, componentId);
+ if (component != null) {
+ break;
+ }
+ }
}
return component;
}
Issue Links
- depends on
-
ICE-6659 ice:inputText required validation not happening properly inside portlet
-
- Closed
-
-
ICE-6667 Portlets: CoreComponentUtils findComponent not absolutely finding components
-
- Closed
-
- duplicates
-
ICE-6226 Unable to use ice:dataPaginator compat component as a JSF 2.0 composite component
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Comment | [ Can you please provide the whole .xhtml page, so we can see the parents of these components, to see what the NamingContainers in the parentage are. ] |
Salesforce Case | [] | |
Fix Version/s | 2.0.1 [ 10255 ] | |
Assignee | Mark Collette [ mark.collette ] |
Salesforce Case | [5007000000FZuRM] |
Link | This issue depends on ICE-5721 [ ICE-5721 ] |
Fix Version/s | 2.1 [ 10241 ] | |
Fix Version/s | 2.0.1 [ 10255 ] |
Assignee | Mark Collette [ mark.collette ] | Neil Griffin [ ngriffin7a ] |
Assignee | Neil Griffin [ ngriffin7a ] | Deryk Sinotte [ deryk.sinotte ] |
Assignee | Deryk Sinotte [ deryk.sinotte ] | Ken Fyten [ ken.fyten ] |
Fix Version/s | 3.1 [ 10312 ] | |
Fix Version/s | 3.0 [ 10241 ] |
Fix Version/s | 3.2 [ 10338 ] | |
Fix Version/s | 3.1 [ 10312 ] |
Fix Version/s | 3.3 [ 10370 ] | |
Fix Version/s | 3.2 [ 10338 ] |
Fix Version/s | 3.3 [ 10370 ] |
Assignee | Ken Fyten [ ken.fyten ] |
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Invalid [ 6 ] |
Are those components within a form? Does the form have prependId=false?