[
https://issues.jboss.org/browse/RF-11112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brian Leathem reassigned RF-11112:
----------------------------------
Assignee: Brian Leathem
> PartialViewContext#getRenderIds() implementation returns empty set
> ------------------------------------------------------------------
>
> Key: RF-11112
> URL: https://issues.jboss.org/browse/RF-11112
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.0.0.Final
> Environment: Win7 x64, Eclipse Helios SR2, JBoss AS 6.0.0 Final, RF
> 4.0.0 Final.
> Reporter: Bauke Scholtz
> Assignee: Brian Leathem
> Fix For: 4.1.0.Tracking
>
>
> During invoke action phase we would like to retrieve a list of partial render
> IDs for some specific preprocessing (resetting submitted values for the case
> they're embedded in another form). Those IDs are normally available by
> {{PartialViewContext#getRenderIds()}}.
> {code}
> PartialViewContext partialViewContext =
> FacesContext.getCurrentInstance().getPartialViewContext();
> Collection<String> renderIds = partialViewContext.getRenderIds();
> {code}
> This works fine in combination with standard JSF components, such as
> {{<h:commandLink><f:ajax render="foo"/></h:commandLink>}} However, when a
> RichFaces/A4J command component is been used, such as {{<a4j:commandLink
> render="foo" />}}, an empty collection is been returned instead. Debugging
> learns that the {{ExtendedPartialViewContextImpl}} implementation stores them
> in {{componentRenderIds}} instead of {{renderIds}} and never returns it on
> {{getRenderIds()}} method. The {{ExtendedPartialViewContextImpl}} also
> doesn't seem to use {{renderIds}} in a sensible manner anywhere else.
> I believe that {{componentRenderIds}} really has to be {{renderIds}} instead.
> As far now, we workarounded this by accessing the {{componentRenderIds}}
> field using reflection.
> {code}
> Collection<String> renderIds = partialViewContext.getRenderIds();
> if (renderIds.isEmpty() && partialViewContext instanceof
> ExtendedPartialViewContextImpl) {
> try {
> Field componentRenderIds =
> ExtendedPartialViewContextImpl.class.getDeclaredField("componentRenderIds");
> componentRenderIds.setAccessible(true);
> renderIds = (Collection<String>)
> componentRenderIds.get(partialViewContext);
> } catch (Exception e) {
> // Handle.
> }
> }
> {code}
> However, this introduced a nasty dependency in our code.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues