myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Griffin (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (PORTLETBRIDGE-178) Portlet Bridge 3.0.0 -- Support Views using Ajax that reference component ids (in the execute or render id list)
Date Mon, 24 Apr 2017 18:44:04 GMT

    [ https://issues.apache.org/jira/browse/PORTLETBRIDGE-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981654#comment-15981654
] 

Neil Griffin commented on PORTLETBRIDGE-178:
--------------------------------------------

This doesn't seem to be a problem with Mojarra 2.2.13 as [AjaxBehaviorRenderer.java|https://github.com/javaserverfaces/mojarra/blob/2.2.13/jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/AjaxBehaviorRenderer.java#L341]
finds the corresponding component in the tree and then calls UIComponent.getClientId() in
order to render the value of the {{javax.faces.partial.execute}} and/or {{javax.faces.partial.render}}
XHR parameter values.

> Portlet Bridge 3.0.0 -- Support Views using Ajax that reference component ids (in the
execute or render id list)
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-178
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-178
>             Project: MyFaces Portlet Bridge
>          Issue Type: Bug
>          Components: Impl
>    Affects Versions: 3.0.0-alpha
>            Reporter: Michael Freedman
>            Assignee: Michael Freedman
>             Fix For: 3.0.0-alpha
>
>
> The Faces 2.0 ajax javascript signature takes two parameters that allow you to identify
the targets of the action and the render.  Many samples, (and hence commonly) set these ids
statically.  This breaks when run in a portlet/bridge environment because the bridge wraps
the entire tree with its own UIViewRoot which adds a NamingContainer to ensure are ids are
unique in an overall portal page.  I.e. its NC prefix is prepended to the component id.  
> So the problem is the request sends ids x, y, z while the tree contains nc.x, nc,y, nc.z.
 hence the ids aren't found and nothing is executed/rendered.
> Fix is to write our own PartialViewContext which overrides getRenderIds() and getExecuteIds()
and take all the ids that don't resolve and retry them with the nc id prepended.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message