melloware commented on PR #435:
URL: https://github.com/apache/myfaces/pull/435#issuecomment-1358493401
Not sure if this matters but mojarra does this in PartialResponseWriter and
it doesn't look like MyFaces does?
It looks like it is doing NamingContainer View ID code just thought I would
mention it.
```java
@Override
public void startDocument() throws IOException {
ResponseWriter writer = getWrapped();
String encoding = writer.getCharacterEncoding( );
if( encoding == null ) {
encoding = "utf-8";
}
writer.writePreamble("<?xml version='1.0' encoding='" + encoding +
"'?>\n");
writer.startElement("partial-response", null);
FacesContext ctx = FacesContext.getCurrentInstance();
if (null != ctx && ctx.getViewRoot() instanceof NamingContainer) {
String id = ctx.getViewRoot().getContainerClientId(ctx);
writer.writeAttribute("id", id, "id");
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]