[jsr-314-open-mirror] [jsr-314-open] javax.faces.ViewState + ppr case

Martin Marinschek mmarinschek at apache.org
Tue May 11 17:53:59 EDT 2010


Hi Neil,

On 5/11/10, Neil Griffin <neil.griffin at portletfaces.org> wrote:
> Since UIViewRoot does not implement NamingContainer, the JSR 301/329 specs
> defines the PortletNamingContainerUIViewRoot [1] which, as its name
> indicates, does indeed implement NamingContainer. This is what causes a nice
> namespaced ID for all components in the rendered view. The code for this
> typically looks something like this:
>
> public class PortletNamingContainerUIViewRoot extends UIViewRoot implements
> NamingContainer, Serializable {
>
> 	private static final long serialVersionUID = 6744332823172081041L;
> 	private String namespace;
>
> 	@Override
> 	public String getContainerClientId(FacesContext facesContext) {
>
> 		if (namespace == null) {
> 			ExternalContext externalContext = facesContext.getExternalContext();
> 			namespace = externalContext.encodeNamespace("");
> 		}
>
> 		return namespace;
> 	}

yes, ok, I knew that. I just don't see how to exploit it, cause the
hidden input with id javax.faces.ViewId will _not_ be namespaced. We
could determine the namespace and only update the
javax.faces.ViewId-elements within forms where the id starts with our
namespace?

best regards,

Martin



More information about the jsr-314-open-mirror mailing list